Interface JsonConverter
- All Known Implementing Classes:
DefaultJsonConverter
,XstreamJsonConverter
public interface JsonConverter
convert objects to json and back. The implementation does not need to log things,
they will be logged in the caller
-
Method Summary
Modifier and TypeMethodDescriptionconvertFromJson
(String json, StringBuilder warnings) convert a json string to an object.convertToJson
(Object object) convert an object to json.void
convertToJson
(Object object, Writer writer) convert an object to json.
-
Method Details
-
convertToJson
convert an object to json. Note, there are only certian aliases which are allowed to be converted from json, so make sure to marshal the container object name somewhere (e.g. in the top level json object)- Parameters:
object
-- Returns:
- the json
-
convertToJson
convert an object to json. Note, there are only certian aliases which are allowed to be converted from json, so make sure to marshal the container object name somewhere (e.g. in the top level json object)- Parameters:
object
- to convert to jsonwriter
- write the json here
-
convertFromJson
convert a json string to an object. note that only certain object are allowed to be marshaled from json, the aliases in WsRestClassLookup.getAliasClassMap()- Parameters:
json
-warnings
- put warnings here- Returns:
- the object
-