Class JsonWriter<M>

  • Type Parameters:
    M - the starting data format for the model to be inputed
    All Implemented Interfaces:
    DataWriter<M,​String>

    public class JsonWriter<M>
    extends AutoBeanWriter<M,​String>
    An AutoBeanWriter that writes an auto bean into Json.
    • Constructor Detail

      • JsonWriter

        public JsonWriter​(com.google.web.bindery.autobean.shared.AutoBeanFactory factory,
                          Class<M> clazz)
        Creates a new JSON writer for auto beans.
        Parameters:
        factory - the auto bean factory
        clazz - the target class
    • Method Detail

      • write

        public String write​(M model)
        Description copied from interface: DataWriter
        Converts a source model to its equivalent target type.
        Parameters:
        model - the source model
        Returns:
        the equivalent target type