(doc)
return float(d_str)
Decode a JSON double to python float.
Decode a JSON double to python float.
Decode a JSON double to python float .
def _parse_canonical_double(doc):
    """Decode a JSON double to python float."""
    d_str = doc['$numberDouble']
    if len(doc) != 1:
        raise TypeError('Bad $numberDouble, extra field(s): %s' % (doc,))
    if not isinstance(d_str, string_type):
        raise TypeError('$numberDouble must be string: %s' % (doc,))
    return float(d_str)
def _parse_canonical_double ( doc ) : d_str = doc [ '$numberDouble' ] if len ( doc ) != 1 : raise TypeError ( 'Bad $numberDouble, extra field(s): %s' % ( doc , ) ) if not isinstance ( d_str , string_type ) : raise TypeError ( '$numberDouble must be string: %s' % ( doc , ) ) return float ( d_str )