Class JsonProducer

    • Constructor Detail

      • JsonProducer

        public JsonProducer()
    • Method Detail

      • initOutput

        protected net.minidev.json.JSONObject initOutput()
        Initializes the output data structure.
        Specified by:
        initOutput in class AbstractOptionProducer<net.minidev.json.JSONObject,​Object>
        Returns:
        the created data structure
      • addArray

        protected void addArray​(net.minidev.json.JSONObject obj,
                                String key,
                                Object[] values)
        Adds the array.
        Parameters:
        key - the identifier for the array
        values - the values of the array
      • addArray

        protected void addArray​(String key,
                                Object[] values)
        Adds the array.
        Parameters:
        key - the identifier for the array
        values - the values of the array
      • addArray

        protected void addArray​(AbstractArgumentOption option,
                                String key,
                                Object values)
        Adds the array.
        Parameters:
        option - the associated option
        key - the identifier for the array
        values - the values of the array
      • addPair

        protected void addPair​(String key,
                               Object value)
        Adds the named key/value pair.
        Parameters:
        key - the identifier for the value
        value - the value
      • newObject

        protected net.minidev.json.JSONObject newObject​(Object obj)
        Creates a new JSON object.
        Parameters:
        obj - the object to add to a JSONObject structure
        Returns:
        the JSON object
      • main

        public static void main​(String[] args)
        Executes the producer from commandline.
        Parameters:
        args - the commandline arguments, use -help for help