#NEWLINE# def parse_json_item( json_item , schema ) : #NEWLINE# #INDENT# "Parse the json item (optionally based on a schema).\n\n    :param json_item: A JSON item in the form 'key=value'\n    :type json_item: str\n    :param schema: The JSON schema to use for parsing\n    :type schema: dict\n    :returns: A tuple for the parsed JSON item\n    :rtype: (str, any) where any is one of str, int, float, bool, list or dict\n    " #NEWLINE# terms = json_item . split ( '=' , 1 ) #NEWLINE# if ( len ( terms ) != 2 ) : #NEWLINE# #INDENT# raise DCOSException ( '{!r} is not a valid json-item' . format ( json_item ) ) #NEWLINE# #UNINDENT# key = terms [ 0 ] #NEWLINE# if schema : #NEWLINE# #INDENT# value = parse_json_value ( key , terms [ 1 ] , schema ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# value = _find_type ( clean_value ( terms [ 1 ] ) ) #NEWLINE# #UNINDENT# return ( json . dumps ( key ) , value )