Hi,
The JSON parser gives a parsing error for the following JSON:
{
“image”: {
"@url": “http://www.last.fm/music/Bon+Jovi/+images/26760885"
”#url2": “http://www.last.fm/music/Bon+Jovi/+images/26760885”
}
}
While it may be that using @ and # within identifiers is not allowed, at least the last.fm api’s returns json that contains these characters. Is it possible to make the parser less strict and allow these two characters for identifiers? The change would be very simple, replace in juce_Identifier.cpp isValidIndentifier with:
bool Identifier::isValidIdentifier (const String& possibleIdentifier) noexcept
{
return possibleIdentifier.isNotEmpty()
&& possibleIdentifier.containsOnly (“abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#_-:”);
}
Patrick
