Class SimpleJsonSerializer
java.lang.Object
org.springframework.integration.json.SimpleJsonSerializer
public final class SimpleJsonSerializer
extends java.lang.Object
Extremely simple JSON serializer. Only handles top level
properties accessed by getters.
- Since:
- 5.0
-
Method Summary
Modifier and Type Method Description static java.lang.StringtoJson(java.lang.Object bean, java.lang.String... propertiesToExclude)Convert the bean to JSON with the provided properties.
-
Method Details
-
toJson
public static java.lang.String toJson(java.lang.Object bean, java.lang.String... propertiesToExclude)Convert the bean to JSON with the provided properties.- Parameters:
bean- the object to serialize.propertiesToExclude- the property names to ignore.- Returns:
- the JSON.
-