java.lang.Object | |
↳ | com.datalogic.extension.selfshopping.led.action.persistence.PersistJSON |
Helper class to allow persisting LedAction
objects to the JSON format. The same operation is also available through reflection
by using a classic JSON library (such as Google GSON).
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Converts a JSON string into a
LedAction . | |||||||||||
Converts a
LedAction
into a JSON string. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Converts a JSON string into a LedAction
.
This is done taking into consideration all the JSON attributes present
in the string to generate the resulting object. If there are wrong or
missing attributes the operation will fail by returning null.
json | The input JSON string. |
---|
LedAction
if the conversion succeeds, null
otherwise.
Converts a LedAction
into a JSON string. This is done taking into consideration all the internal
variables composing the object and making them available in the resulting string.
If the input object cannot be converted to JSON, a null string will be returned.
action | The input LedAction . |
---|
String
The resulting JSON String if the conversion succeeds, null
otherwise.