Thanks for the quick reply, but I was hoping to use v8's native parser. I imagine worst-case I can get a reference to the context's JSON.parse function and Function::Call() it, which I'd prefer over adding another dependency.
Rob. On Wed, Apr 28, 2010 at 4:21 PM, Stephan Beal <[email protected]> wrote: > On Thu, Apr 29, 2010 at 1:17 AM, Robert Ginda <[email protected]> wrote: >> >> I'm working on a v8 embedding that needs to take a JSON file as a >> command line argument. I'd prefer not to Script::Run() it directly, >> for the usual reason folks don't want to eval() json. Is there a >> native API for JSON.parse()? > > You may want to check out the list of implementations near the bottom of the > page at: > http://json.org/ > the only one of those i've used is jsoncpp, which is really simple to use > but also has a few incompatibilities with JS/JSON which might annoy or > hinder certain users (e.g. properties are stored in lexical sort order, > instead of their insertion order, and the default value for a JS var is null > instead of undefined (a value the framework doesn't account for at all)). > -- > ----- stephan beal > http://wanderinghorse.net/home/stephan/ > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
