Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Transform a Python type to a json-schema type

src/p/y/py2json-HEAD/py2json/test/test_py2json.py   py2json(Download)
        json_smd = Py2JSON(Foo)
        s = 'string'
        assert json_smd.to_json_schema_type(s) == 'string'
        i = 666
        assert json_smd.to_json_schema_type(i) == 'integer'
        f = 666.666
        assert json_smd.to_json_schema_type(f) == 'number'
        l = [6, 6, 6]
        assert json_smd.to_json_schema_type(l) == 'array'
        assert json_smd.to_json_schema_type(l) == 'array'
        nill = None
        assert json_smd.to_json_schema_type(nill) == 'any'
 
    def test_get_docstring_method(self):