issue with property_tree/json_parser

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

issue with property_tree/json_parser

Boost - Users mailing list
Hi All,
I am trying to use boost json_parser. I have included json_parser.hpp in my cpp file, I have not included any other code. But I am getting many compilation  errors  like error: 'boost::spirit::classic' has not been declared and
In function void boost::property_tree::json_parser::read_json_internal(std::basic_istream<typename Ptree::key_type::value_type, std::char_traits<typename Ptree::key_type::value_type> >&, Ptree&, const std::string&):
     [exec] /usr/include/boost/property_tree/detail/json_parser_read.hpp:288: error: \u2018classic\u2019 is not a namespace-name

Can you help me resolve this issue?

--
Thanks
Harikrishna

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: issue with property_tree/json_parser

Boost - Users mailing list
On Fri, Jan 25, 2019 at 12:41 PM Harikrishna via Boost-users
<[hidden email]> wrote:
>
> Hi All,
> I am trying to use boost json_parser. I have included json_parser.hpp in my cpp file, I have not included any other code. But I am getting many compilation  errors  like error: 'boost::spirit::classic' has not been declared and
> In function void boost::property_tree::json_parser::read_json_internal(std::basic_istream<typename Ptree::key_type::value_type, std::char_traits<typename Ptree::key_type::value_type> >&, Ptree&, const std::string&):
>      [exec] /usr/include/boost/property_tree/detail/json_parser_read.hpp:288: error: \u2018classic\u2019 is not a namespace-name
>
> Can you help me resolve this issue?

I read the documentation on Boost.PropertyTree support for JSON, and
came to the conclusion that I did not want to be constrained by the
limitations imposed by Boost.PropertyTree, etc.

Interesting, though, that it has to do with Boost.Spirit.Classic.

At the end of the day I decided to roll my own AST and Boost.Spirit.Qi
parser. So far so good, it's not that complicated.

> Thanks
> Harikrishna
> _______________________________________________
> Boost-users mailing list
> [hidden email]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: issue with property_tree/json_parser

Boost - Users mailing list
On 26/01/2019 06:54, Michael Powell wrote:
> At the end of the day I decided to roll my own AST and Boost.Spirit.Qi
> parser. So far so good, it's not that complicated.

Given that you've been working on that for at least three months, this
must be some strange usage of "not that complicated" which I wasn't
previously aware of... :)


For the record, most people who want to read/write JSON in C++ outside
of Boost.PropertyTree would use an existing library, such as (but not
limited to):

  - https://nlohmann.github.io/json/
  - http://rapidjson.org/
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users