Opened 11 years ago

Last modified 7 years ago

#6351 new Feature Requests

Better JSON parser

Reported by: nn-mail@… Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc:

Description

JSON parser in property_tree doesn't parse numbers and bools as their type. Instead it stores them as string.

property_tree for JSON could be defined in other way:

typedef boost::variant<int, long, std::string> base_json_type;
typedef boost::variant<
  base_json_type,
  std::vector<base_json_type>
> composite_json_type;

typedef boost::basic_ptree<std::string, composite_json_type> json_ptree;

Change History (1)

comment:1 by Sebastian Redl, 7 years ago

The new JSON parser's event interface is much better suited to reading JSON faithfully. I just need to define a front-end.

Note: See TracTickets for help on using tickets.