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 Detail

      • getValueAtKey

        Object getValueAtKey​(String key)
        Parameters:
        key - One of the keys returned by getPropertyKeys().
        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 interface com.alibaba.fastjson.serializer.JSONSerializable
        Throws:
        IOException