[ 
https://issues.apache.org/jira/browse/AVRO-58?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12722256#action_12722256
 ] 

Matt Massie commented on AVRO-58:
---------------------------------

Yes, it will work with C++.  I forgot to put the {code}extern "C" {{code} 
declaration in but once that's done I see no reason for this parser to not work 
in a C++ application (although I haven't tested it).  The reason I didn't use 
bison/flex is that I wanted the parser to be re-entrant, thread-safe and 
embeddable since we need to support long-running apps that are processing Avro 
data from sockets, files and disk simultaneously.  Newer versions of bison/flex 
have a %pure parser option (if I remember correctly) but then you have to 
manage bison/flex version dependencies.

You could test the parser pretty easily by linking to libavro and including the 
json.h header file.  You'll need to add the {code}extern "C" {{code} 
declaration.  There is no documentation on the JSON parser (for now) but all 
the public methods you would need are in "json.h".  The test_json_parser unit 
test should be helpful as well.  I'm happy to answer any questions or help with 
code if you need it.  If you like, I could even do C++ tests myself.

> JSON Parser for C
> -----------------
>
>                 Key: AVRO-58
>                 URL: https://issues.apache.org/jira/browse/AVRO-58
>             Project: Avro
>          Issue Type: New Feature
>          Components: c
>            Reporter: Matt Massie
>         Attachments: AVRO-58.patch
>
>
> Embedded JSON Parser for C
> * Re-entrant and thread safe
> * Supports multiple parsers running at the same time
> * Uses APR memory pools for memory management
> * No dependencies on yacc/bison/flex/etc
> * Creates a light-weight DOM of JSON text
> * Completely written by me so there's no licensing issues (using the public 
> domain lemon code generator)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to