Class JsonBinding

  • All Implemented Interfaces:
    AutoCloseable, javax.json.bind.Jsonb

    public class JsonBinding
    extends Object
    implements javax.json.bind.Jsonb
    Implementation of Jsonb interface.
    Author:
    Dmitry Kornilov
    • Method Detail

      • fromJson

        public <T> T fromJson​(String str,
                              Class<T> type)
                       throws javax.json.bind.JsonbException
        Specified by:
        fromJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • fromJson

        public <T> T fromJson​(String str,
                              Type type)
                       throws javax.json.bind.JsonbException
        Specified by:
        fromJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • fromJson

        public <T> T fromJson​(Reader reader,
                              Class<T> type)
                       throws javax.json.bind.JsonbException
        Specified by:
        fromJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • fromJson

        public <T> T fromJson​(Reader reader,
                              Type type)
                       throws javax.json.bind.JsonbException
        Specified by:
        fromJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • fromJson

        public <T> T fromJson​(InputStream stream,
                              Class<T> clazz)
                       throws javax.json.bind.JsonbException
        Specified by:
        fromJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • fromJson

        public <T> T fromJson​(InputStream stream,
                              Type type)
                       throws javax.json.bind.JsonbException
        Specified by:
        fromJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • toJson

        public String toJson​(Object object)
                      throws javax.json.bind.JsonbException
        Specified by:
        toJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • toJson

        public String toJson​(Object object,
                             Type type)
                      throws javax.json.bind.JsonbException
        Specified by:
        toJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • toJson

        public void toJson​(Object object,
                           Writer writer)
                    throws javax.json.bind.JsonbException
        Specified by:
        toJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • toJson

        public void toJson​(Object object,
                           Type type,
                           Writer writer)
                    throws javax.json.bind.JsonbException
        Specified by:
        toJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • toJson

        public void toJson​(Object object,
                           OutputStream stream)
                    throws javax.json.bind.JsonbException
        Specified by:
        toJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • toJson

        public void toJson​(Object object,
                           Type type,
                           OutputStream stream)
                    throws javax.json.bind.JsonbException
        Specified by:
        toJson in interface javax.json.bind.Jsonb
        Throws:
        javax.json.bind.JsonbException
      • createJsonpProperties

        protected Map<String,​?> createJsonpProperties​(javax.json.bind.JsonbConfig jsonbConfig)
        Propagates properties from JsonbConfig to JSONP generator / parser factories.
        Parameters:
        jsonbConfig - jsonb config
        Returns:
        properties for JSONP generator / parser