topojson - use json.value directly

This commit is contained in:
artemp 2016-05-12 18:52:05 +02:00
parent 04ce225728
commit 38ec14c739
2 changed files with 1 additions and 3 deletions

View file

@ -70,7 +70,6 @@ private:
// properties // properties
qi::rule<Iterator, space_type, mapnik::topojson::properties()> properties; qi::rule<Iterator, space_type, mapnik::topojson::properties()> properties;
qi::rule<Iterator, space_type, mapnik::topojson::properties()> attributes; qi::rule<Iterator, space_type, mapnik::topojson::properties()> attributes;
qi::rule<Iterator, space_type, mapnik::json::json_value()> attribute_value;
// id // id
qi::rule<Iterator,space_type> id; qi::rule<Iterator,space_type> id;
}; };

View file

@ -262,10 +262,9 @@ topojson_grammar<Iterator, ErrorHandler>::topojson_grammar()
>> (( lit('{') >> attributes >> lit('}')) | json.object) >> (( lit('{') >> attributes >> lit('}')) | json.object)
; ;
attributes = (json.string_ >> lit(':') >> attribute_value) % lit(',') attributes = (json.string_ >> lit(':') >> json.value) % lit(',')
; ;
attribute_value %= json.number | json.string_ ;
arcs = lit("\"arcs\"") >> lit(':') arcs = lit("\"arcs\"") >> lit(':')
>> lit('[') >> -( arc % lit(',')) >> lit(']') ; >> lit('[') >> -( arc % lit(',')) >> lit(']') ;