Click here to Skip to main content
Page 1 of 5
Page Size: 10 · 25 · 50


Author filtered by: John W. Wilkinson [x]
Article 13 May 2013   license: MIT
A C++ JSON parser/generator written using Boost::spirit
Forum Message 11 May 2013  
Many thanks for reporting the problem. I will make sure the change is in the forthcoming release. Regards John
Forum Message 8 May 2013  
I should do a new release. I have a number of changes locally. I will see to it over the next few days. Regards John
Re: Unicode escaping support by John W. Wilkinson
Forum Message 28 Apr 2013  
Hi Valery, That's fine, I am glad you found the code helpful, I've just being trying to clarify in my mind what the issue is. I would imagine that whether non-ascii characters should be escaped
Re: Unicode escaping support by John W. Wilkinson
Forum Message 27 Apr 2013  
Hi Valery, Thank you for your reply. Why is iswprint returning true for valid hebrew characters a problem? A JSON string can contain any valid unicode character, the RFC says "All Unicode charac
Re: Unicode escaping support by John W. Wilkinson
Forum Message 22 Apr 2013  
Hi Valery, I don't see the problem using your exammple code. I get the correct text in "test.new". What version of JSON Spirit are you using? The function non_printable_to_string in js
Re: Unicode escaping support by John W. Wilkinson
Forum Message 21 Apr 2013  
Hi Valery, Thank you for your message. I can't however find such a problem. The following code for example read in and then writes out exactly the same text. const wstring in
Forum Message 7 Apr 2013  
Hi Tony, Thanks for your post. Definitely a slip up on my part, JSON Spirit returns strings and values by const reference in other cases. Regards John
Forum Message 10 Feb 2013  
I am not familiar with Back Berry 10 development but if boost is available on it then it is very probable that you can use JSON Spirit. Regards John
Forum Message 12 Oct 2012  
I will need more information to answer your question, but are you aware this is a C++ project, it would appear you are using C#? Regards John
Forum Message 2 Aug 2012  
I am afraid I cannot think of a way to do this. I thought that all that would be needed would be to change the signature of the new_real semantic action from a double to a pair of string iterators. Ho
Forum Message 1 Aug 2012  
Hi, I don't see doubles being truncated like that, for example the following code prints out "2.2086570657060003": string s = "2.2086570657060003"; Value v; read( s, v ); double d
Forum Message 12 Jul 2012  
Thanks for the post, you raise a good point. I must get a round to doing a new release. There are a few such issues that it would be nice to address. John
Forum Message 5 Jun 2012  
You should be able to open the provided VS2005 "solution" file. VS2010 will convert it and the associated project files to 2010 format. John
Re: GCC 4.1.2 patch by John W. Wilkinson
Forum Message 20 May 2012  
Thanks I will incorporate the change. Note the version of GCC I used was 4.4.3. This version doesn't raise any errors. Regards John
Forum Message 16 May 2012  
Yes, thanks for reporting the problem and supplying a fix. I will be putting out a new release in a couple of weeks. John
Forum Message 13 Apr 2012  
Hi Kathy, I do not know enough about Linux to advice you on the best way to set up BOOST_ROOT. There are a number of alternatives, it would be in a file that runs at log in or system start up, it w
Re: My vote of 5 by John W. Wilkinson
Forum Message 13 Apr 2012  
There is nothing else to do, just add it to the top level CMakelists.txt file. Put it where the other similar lines are. Regards John
Re: My vote of 5 by John W. Wilkinson
Forum Message 1 Apr 2012  
Thank you Scott for reporting the problem. I will make sure it is fixed in the next release. Regards John
Re: My vote of 5 by John W. Wilkinson
Forum Message 15 Mar 2012  
Yes that is not very good, although it is true to say that anyone using the library will have access to the header files where the value type enum is defined. I will improve the .message as per your s
Re: My vote of 5 by John W. Wilkinson
Re: write_format question? by John W. Wilkinson
Forum Message 7 Mar 2012  
The problem might be that you are not linking to the JSON Spirit library. There are a number of ways to do this. One is to add the library file as an "Additional dependency" in the Linker/Input page o
Forum Message 29 Feb 2012  
There is not much more to say than is in the documentation. The read functions return false if the given string is not valid JSON or if some other problem occurs such as out of memory. The read_or_thr
Re: Add support to comments by John W. Wilkinson
Forum Message 29 Feb 2012  
Thanks that is a good idea. I will incorporate it into the next release, John
Re: Unordered map by John W. Wilkinson
Forum Message 3 Jan 2012  
Thanks that's an interesting option, John
Forum Message 3 Jan 2012  
I use SVN locally but this is not publicly accessible. You can however access past releases from the "revisions" tab at the top of the page. Regards John
Re: Streaming read by John W. Wilkinson
Forum Message 16 Oct 2011  
That's seems a reasonable idea, but like I said I have not got any free time at the moment. Regards John
Re: Streaming read by John W. Wilkinson
Forum Message 3 Oct 2011  
It is good to get feature requests. I will think about it but I have other forthcoming commitments that would prevent me implementing such a significant new feature in the short to medium term. Regar
Re: Streaming read by John W. Wilkinson
Forum Message 27 Sep 2011  
Hi Kevin, JSON Spirit hasn't got the equivalent of Gson's "streaming read". JSON Spirit will read a sequence of objects sequentially but if you have one very large object the complete object is rea
Forum Message 10 Sep 2011  
Yes it is a bug. The zero digits following a decimal point is non standard, RFC 4627 says: "A fraction part [of a number] is a decimal point followed by one or more digits." Thanks fo
Forum Message 9 Sep 2011  
I am sorry I cannot really tell what is going on. The JSON Spirit code compiles with GCC on Ubuntu so there should not be a problem. Could I suggest you try compiling/linking from the command line. Th
Forum Message 8 Sep 2011  
Have you tried building the Eclipse project files using CMake with the provided CMakeLists.txt files? It should work for Eclipse. You need to set the environment variable BOOST_ROOT to point to your b
Forum Message 19 Aug 2011  
Hi Srdjan, I don't see this problem. I get the following output: {"a":1,"b":[11],"c":[11,{"a":1,"b":[11]}]} {"a":1,"b":[11],"c":[11,{"a":1,"b":[11]}]} from: wmValue aObj; wstring inpu
Forum Message 1 Aug 2011  
I haven't tried flex, bison or other similar. Writing a recursive descent parser for JSON is however pretty easy. There is no link for the code but I can email it to you if you can provide an addres
Forum Message 1 Aug 2011  
It compiles without error with gcc 4.4.3 and boost version 1.47.0. Can you confirm that you have 1.47.0? John
Forum Message 31 Jul 2011  
I did look a spirit.qi around 18 months ago. I replaced the spirit::classic implementation with one using spirit::qi. The resultant code was very neat, no semantic actions were needed as an AST was ge
Forum Message 31 Jul 2011  
Hi, I will look into this. Sorry for not responding sooner but I have been on holiday. John
Forum Message 24 Jun 2011  
I glad you like the idea. I have implemented it myself. See patch below. Regards John Index: C:/svn/test formater/json_spirit/json_spirit_writer_options.h ==================================
Forum Message 9 Jun 2011  
I quite like the idea, at least for arrays, not sure of the benefit for objects. However I think you get a nice result if you print arrays 'ugly' unless they contain compound elements, i.e. other arra
Re: Connection to boost::variant. by John W. Wilkinson
Forum Message 2 Jun 2011  
I have made some progress. I have moved your visitor into Value_impl altering it so that it returns the variant type used by Value_impl: class Variant_converter_visitor : public boost:
Re: Fixed point output of reals? by John W. Wilkinson
Forum Message 31 May 2011  
I am reluctant to provide the feature because other people may want other output options and I will end up having flags for every possible combination of the available IO manipulators. It might be bet
Re: Fixed point output of reals? by John W. Wilkinson
Forum Message 30 May 2011  
Thanks for the feedback. Could you clarify what exactly the request is please? Do you mean printf %f type output with a specified number of number of digits after the decimal point? Regards John
Re: Connection to boost::variant. by John W. Wilkinson
Forum Message 27 May 2011  
Thanks I think it is clear now and it does look like a reasonable improvement. A couple of points/queries: 1. I suppose the visitor would need to be a template class to handle the different js valu
Forum Message 24 May 2011  
I am pleased that you like the library and find it useful. I did a quick google of "boost variant strict aliasing" and it looks like a known issue with boost.variant. It seems to be a false positive.
Re: Connection to boost::variant. by John W. Wilkinson
Forum Message 19 May 2011  
Thanks for the suggestion and the offer of writing a patch, but can you clarify some details please. Are you suggesting the the json_spirit::Value_impl::Variant type be made public and that a construc
Re: building on 64 bit ubutu by John W. Wilkinson
Forum Message 20 Apr 2011  
Hi Ashish, I have just double checked and it builds fine on my 64 bit Ubuntu. (I have only just got your message. I hope you have already solved the problem.) Regards John
Forum Message 10 Mar 2011  
I wouldn't say that the article is particularly misleading as I would think that wstrings are often used to hold unicode, and yes you can use std::string for UTF-8, in fact the JSON Spirit's raw
Re: Escaping forward slash by John W. Wilkinson
Forum Message 10 Mar 2011  
Hi Gautam, The JSON RFC, http://www.ietf.org/rfc/rfc4627.txt?number=4627[

Page 1 of 5
1 2 3 4 5


Advertise | Privacy | Mobile
Web04 | 2.6.130513.1 | Last Updated 14 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid