Sha256: 8e9c1fbd96a20ba72eb37a1d25924ab8c3f8d386cc5ebc37ceb9d67c429db383
Contents?: true
Size: 597 Bytes
Versions: 4
Compression:
Stored size: 597 Bytes
Contents
#include <stdio.h> #include <stdlib.h> #include "json.h" int main() { struct json_object *jobj; char *input = (char*)malloc(1024); while (fgets(input, 1024, stdin) != NULL) { jobj = json_tokener_parse(input); if (is_error(jobj)) { printf("error parsing json: %s\n", json_tokener_errors[-(unsigned long)jobj]); } else { printf("%s\n", json_object_to_json_string(jobj)); json_object_put(jobj); } } return 0; }
Version data entries
4 entries across 4 versions & 4 rubygems