Last active
May 1, 2021 07:53
-
-
Save shreyasms17/979a8bf3664cfb2fb88f6053ff337f54 to your computer and use it in GitHub Desktop.
AutoFlatten get_fields_in_json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_fields_in_json(self, json_schema): | |
''' | |
Description: | |
This function takes in the schema in json format and returns the metadata of the schema | |
:param json_schema: [type : str] a string containing path to raw data | |
:return fields: [type : dict] contains metadata of the schema | |
''' | |
a = json_schema.json() | |
schema_dict = json.loads(a) | |
fields = schema_dict['fields'] | |
return fields |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment