I have java class which contains simple String
fields and some of this fields can contain non-ascii symbols and wath that during serialization in JSON this symbols will be converted in \u0000
. I know that I can do it by Jackson, but it can't be used by internal reason.
As ex. Java class
public class SomeClass {
String filed1;
// getter/setter
}
Converted code:
public String convert(SomeClass someClass) {
new JSONSerializer().include( "*" ).serialize(someClass);
}
As result should be JSON:
{fild1:'\u041F\u0440\u0438\u0432\u0435\u0442'}
Instead of
{fild1:'Пример'}