Skip to content

Gson serialize null issue #16323

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
wants to merge 2 commits into from
Closed

Gson serialize null issue #16323

wants to merge 2 commits into from

Conversation

zhanglc
Copy link

@zhanglc zhanglc commented Mar 26, 2019

the serialize null should be false when set spring.gson.serialize-nulls=false

fix issue: #13622

test case:

        @Test
	public void serializeNullsFalse() {
		this.contextRunner.withPropertyValues("spring.gson.serialize-nulls:false")
				.run((context) -> {
					Gson gson = context.getBean(Gson.class);
					assertThat(gson.serializeNulls()).isFalse();
				});
	}

liucheng.zhang and others added 2 commits March 26, 2019 18:20
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 this pull request may close these issues.

3 participants