If the name of a JSON object starts with a @ then the JsonDataSource constructor fails with
java.lang.IllegalStateException: There is an error on reading the JSON. Cannot get an XML string value from token type '1'. Path 'customers.@label', line 1, position 26.
Are there any other characters that are not allowed for the JsonDataSource?
My example program:
public class AsposeTestCase {
public static void main(String[] args) throws Exception {
String jsonAsString = createJsonAsString();
new JsonDataSource(new ByteArrayInputStream(jsonAsString.getBytes(UTF_8)));
System.out.println("Testcase finished successfully");
}
private static String createJsonAsString() {
return "{\"customers\": {\"@label\": {\"name\" : \"name-of-the-group\"}}}";
}
}
I tested the above test case with aspose-words:22.12