diff --git a/ircd/json.cc b/ircd/json.cc index 52f7639dc..da2a084f1 100644 --- a/ircd/json.cc +++ b/ircd/json.cc @@ -97,7 +97,7 @@ struct input rule<> quote { lit('"') ,"quote" }; rule chars { raw[*(char_ - quote)] ,"characters" }; rule string { quote >> chars >> quote ,"string" }; - rule name { string ,"name" }; + rule name { quote >> raw[+(char_ - quote)] >> quote ,"name" }; rule boolean { lit_true | lit_false ,"boolean" }; rule literal { lit_true | lit_false | lit_null ,"literal" }; @@ -185,7 +185,7 @@ struct output rule number { double_ ,"number" }; - rule name { string ,"name" }; + rule name { quote << +(~char_('"')) << quote ,"name" }; rule value { rule{} /* subclass implemented */ ,"value" }; rule member { name << name_sep << value ,"member" };