diff --git a/include/mapnik/json/feature_generator_grammar.hpp b/include/mapnik/json/feature_generator_grammar.hpp index 5f207bbdb..d02c0db0d 100644 --- a/include/mapnik/json/feature_generator_grammar.hpp +++ b/include/mapnik/json/feature_generator_grammar.hpp @@ -126,14 +126,13 @@ struct utf8 } }; -struct value_base +struct extract_string { template - struct result { using type = mapnik::value_base const&; }; - - mapnik::value_base const& operator() (mapnik::value const& val) const + struct result { using type = std::string; }; + std::string operator() (mapnik::value const& val) const { - return val.base(); + return val.to_expression_string(); } }; @@ -159,12 +158,12 @@ struct feature_generator_grammar: escaped_string escaped_string_; karma::rule properties; karma::rule pair; - karma::rule value; + karma::rule value; karma::rule value_null_; karma::rule ustring; typename karma::int_generator int__; boost::phoenix::function id_; - boost::phoenix::function value_base_; + boost::phoenix::function extract_string_; boost::phoenix::function utf8_; std::string quote_; }; diff --git a/include/mapnik/json/feature_generator_grammar_impl.hpp b/include/mapnik/json/feature_generator_grammar_impl.hpp index 04f6599d3..2b5a1ea4f 100644 --- a/include/mapnik/json/feature_generator_grammar_impl.hpp +++ b/include/mapnik/json/feature_generator_grammar_impl.hpp @@ -92,9 +92,8 @@ feature_generator_grammar::feature_generator_grammar() << value(boost::phoenix::at_c<1>(_val)) ; - value = kstring[_1 = "\"FIXME\""] // FIXME (value_null_| bool_ | int__ | double_ | ustring)[_1 = value_base_(_r1)] + value = kstring[_1 = extract_string_(_r1)] ; - value_null_ = kstring[_1 = "null"] ;