Search code examples
rapidjson

is there special characters or strings cannot be used as key in rapidjson?


can special characters be used as a part of key?

For example :

{
    "+new":"addnew.png"
    "":"empty.png"
}

Is this format of rapidjson valid?

Also, is there any special strings that is not valid to use as key?

(I think the earlier question cannot fully answer my question because it does not cover the case of empty string, e.g.:"":"empty.png")


Solution

  • Yes. Any valid string can be used as key. But the shown JSON misses a comma between two members.