Package de.xima.fc.interfaces.json
Interface IJsonLikeObject
-
- All Superinterfaces:
com.alibaba.fastjson.serializer.JSONSerializable
- All Known Implementing Classes:
NodeSoftErrorException
public interface IJsonLikeObject extends com.alibaba.fastjson.serializer.JSONSerializable
Interface for a class that behaves like a JSON object in that it has key value pair. Used e.g. when accessing the object via a JSON path; or when converting the object to a JSON string via the fastJSON library.- Since:
- 7.0.7.
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Collection<String>
getPropertyKeys()
Object
getValueAtKey(String key)
default void
write(com.alibaba.fastjson.serializer.JSONSerializer serializer, Object fieldName, Type fieldType, int features)
-
-
-
Method Detail
-
getValueAtKey
Object getValueAtKey(String key)
- Parameters:
key
- One of the keys returned bygetPropertyKeys()
.- Returns:
- The value at the given key.
-
getPropertyKeys
Collection<String> getPropertyKeys()
- Returns:
- All keys available on the object.
-
write
default void write(com.alibaba.fastjson.serializer.JSONSerializer serializer, Object fieldName, Type fieldType, int features) throws IOException
- Specified by:
write
in interfacecom.alibaba.fastjson.serializer.JSONSerializable
- Throws:
IOException
-
-