Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Avro >> mail # user >> C/C++ parsing vs. Java parsing.


+
Saptarshi Guha 2012-06-25, 06:17
+
Scott Carey 2012-06-26, 01:42
+
Saptarshi Guha 2012-06-26, 02:27
Copy link to this message
-
Re: C/C++ parsing vs. Java parsing.
> 3. C
>
> avro_schema_t *person_schema = (avro_schema_t*)malloc(sizeof(avro_schema_t));
> (avro_schema_from_json_literal(jsonstring, person_schema))
>
> returns:
>
> Error was Error parsing JSON: string or '}' expected near end of file
>
> So is this a bug? or am i calling it wrong.

That error message is from the JSON parser we use internally — it claims that there's a syntax error in the JSON that you've passed in.  Can you send us the snippet where you define jsonstring?  It might be an issue of escaping things correctly in the C string literal.  Also, there's a comment where avro_schema_from_json_literal is defined, saying that jsonstring must be defined as a "char[]" and not a "char *".  And of course it could also be an actual syntax error.  :-)

–doug
+
Saptarshi Guha 2012-06-26, 02:45