Sha256: 15a2b432d6b69ffbc7a69e973543bb23d595661dc957c81f38246613c191a5d0

Contents?: true

Size: 533 Bytes

Versions: 2

Compression:

Stored size: 533 Bytes

Contents

#include <stdio.h>
#include <stdlib.h>

#include "json.h"

int
main()
{
        struct json_object *jobj;
        char *input = malloc(1024);

        while (fgets(input, 1024, stdin) != NULL) {
                jobj = json_tokener_parse(input);
                if (is_error(jobj)) {
                        printf("error parsing json\n");
                } else {
                        printf("%s\n", json_object_to_json_string(jobj));
                        json_object_put(jobj);
                }
        }
        return 0;
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fizx-ordered_json-0.3.2 ext/json-c-0.8/test3.c
fizx-ordered_json-0.3.4 ext/json-c-0.8/test3.c