code: public static Map<String, Object> read(StreamingInput input)
  		throws IOException
  	{
  		Token next = input.peek();
  		if(next == null) return Collections.emptyMap();
  
  		switch(next)
  		{
  			case LIST_START:
  			case LIST_END:
  			case OBJECT_END:
  			case VALUE:
  			case NULL:
  				throw new SerializationException("Error in configuration file, should be in in key, value format");
  		}
  
  		return readMap(input);
  	}
docs: Convert the given stream to a map.
  
  @param input
  @return
  @throws IOException