Skip to content

support escapeUnicode(false) #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ovoled opened this issue Oct 6, 2020 · 0 comments · Fixed by #308
Closed

support escapeUnicode(false) #289

ovoled opened this issue Oct 6, 2020 · 0 comments · Fixed by #308

Comments

@ovoled
Copy link

ovoled commented Oct 6, 2020

There is issue #73 where escapeUnicode = false support was brought through Config.
But there is also method public static String serialize(boolean escapeUnicode, Type type, Object obj) which ignores it's direct parameter escapeUnicode.

Example:

	public static void main(final String[] args) {
		final String obj = "Привет";
		System.err.println(JsonStream.serialize(new Config.Builder().escapeUnicode(false).build(), obj)); //ok
		System.err.println(JsonStream.serialize(false, obj.getClass(), obj)); //not ok
	}

Output:

"Привет"
"\u041f\u0440\u0438\u0432\u0435\u0442"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant