Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support hierarchical json format in json datasource #95

Open
xiajingchun opened this issue Sep 7, 2022 · 1 comment
Open

support hierarchical json format in json datasource #95

xiajingchun opened this issue Sep 7, 2022 · 1 comment
Labels
type/enhancement Type: make the code neat or more efficient

Comments

@xiajingchun
Copy link
Contributor

Today, json datasource only supports "flat" format, e.g., each line of the json file should be like:

 {
"key1:"value1, 
"key2:"value2",
...
}

In some case, the json file could use hierarchical structure, the value of a key is a child-object or even an array of objects, e.g.

{
"key1":
       [
           {"key11":"value11", "key12":"value12"},
           {"key21":"value21", "key22":"value22"},
           ...
       ]
}

Can we add support for this?

@xiajingchun
Copy link
Contributor Author

Regarding the array, it's better to support a mapping like below:
tag.prop1 <-> json["key1"][0]["key11"]
tag.prop2 <-> json["key1"][1]["key22"]
It's up to the user how to design the json object.

@Sophie-Xie Sophie-Xie added the type/enhancement Type: make the code neat or more efficient label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Type: make the code neat or more efficient
Projects
None yet
Development

No branches or pull requests

2 participants