PaddlePaddle/ERNIE-SDK

[Enhancement] using jsonref to parse oepnapi.yaml

wj-Mcat opened this issue · 1 comments

jsonref lets you use a data structure with JSON reference objects, as if the references had been replaced with the referent data.

>>> from pprint import pprint
>>> import jsonref

>>> # An example json document
>>> json_str = """{"real": [1, 2, 3, 4], "ref": {"$ref": "#/real"}}"""
>>> data = jsonref.loads(json_str)
>>> pprint(data)  # Reference is not evaluated until here
{'real': [1, 2, 3, 4], 'ref': [1, 2, 3, 4]}

refer to:

There is no strong demand for us to implement this, so close it.