Fc allows invalid JSON Array parsing
Fc just consumes commas and white space characters without ensuring the proper JSON syntax: https://gitlab.syncad.com/hive/hive/-/blob/b5ae753d5aa7335b2a3aa504e7e037219cc4e2f6/libraries/fc/src/io/json.cpp#L286 Allowing the following:
{
"array": [
"data1", "dataAfterComma" "dataWithoutComma"
"noComma"
]
}
Parsing this JSON object results in variant holding variant_object with "array", which holds array of strings
This code does not throw:
const std::string json = "{\"array\":[\"data\", \"dataAfterComma\" \"dataWithoutComma\"\n\"noComma\"]}";
const fc::variants arr = fc::json::from_string(json).get_object()["array"].get_array();
FC_ASSERT(arr.size() == 4);