Package com.rabbitmq.tools.json
Class JSONUtil
java.lang.Object
com.rabbitmq.tools.json.JSONUtil
Utility methods for working with JSON objects in Java.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object
Uses reflection to fill public fields and Bean properties of the target object from the source Map.static Object
Uses reflection to fill public fields and optionally Bean properties of the target object from the source Map.static void
Ignores reflection exceptions while using reflection to fill public fields and Bean properties of the target object from the source Map.
-
Constructor Details
-
JSONUtil
public JSONUtil()
-
-
Method Details
-
fill
public static Object fill(Object target, Map<String, Object> source) throws IntrospectionException, IllegalAccessException, InvocationTargetExceptionUses reflection to fill public fields and Bean properties of the target object from the source Map. -
fill
public static Object fill(Object target, Map<String, Object> source, boolean useProperties) throws IntrospectionException, IllegalAccessException, InvocationTargetExceptionUses reflection to fill public fields and optionally Bean properties of the target object from the source Map. -
tryFill
Ignores reflection exceptions while using reflection to fill public fields and Bean properties of the target object from the source Map.
-