dukeboard/kevoree-modeling-framework

JSON serialization does not escape special character

Closed this issue · 1 comments

If your model contains:

class MyClass {
  name: String
}

Then you can do something like this:

MyClass c = view.createMyClass().setName("foo\nbar");
System.out.println(c);

Which prints:

{
    "@meta" : "MyClass",
    "@uuid" : "1",
    "name":"foo
bar",
}

This JSON output is not valid.

Fixed in 4.9.1, thanks maxime, tell me if you still face some issues on JSON format