Class JsonVarExploder

  • All Implemented Interfaces:
    com.damnhandy.uri.template.VarExploder

    public class JsonVarExploder
    extends Object
    implements com.damnhandy.uri.template.VarExploder
    An example exploder that reads JSON data and explodes into a URI expression.
    Version:
    $Revision: 1.1 $
    Author:
    Ryan J. McDonough
    • Constructor Detail

      • JsonVarExploder

        public JsonVarExploder​(File file)
                        throws FileNotFoundException,
                               com.damnhandy.uri.template.VarExploderException
        Create a new JsonVarExploder.
        Parameters:
        file -
        Throws:
        FileNotFoundException
        com.damnhandy.uri.template.VarExploderException
      • JsonVarExploder

        public JsonVarExploder​(InputStream in)
                        throws com.damnhandy.uri.template.VarExploderException
        Create a new JsonVarExploder.
        Parameters:
        in -
        Throws:
        com.damnhandy.uri.template.VarExploderException
    • Method Detail

      • getValues

        public Collection<Object> getValues()
                                     throws com.damnhandy.uri.template.VarExploderException
        Specified by:
        getValues in interface com.damnhandy.uri.template.VarExploder
        Throws:
        com.damnhandy.uri.template.VarExploderException
      • getNameValuePairs

        public Map<String,​Object> getNameValuePairs()
                                                   throws com.damnhandy.uri.template.VarExploderException
        Specified by:
        getNameValuePairs in interface com.damnhandy.uri.template.VarExploder
        Throws:
        com.damnhandy.uri.template.VarExploderException