-
Notifications
You must be signed in to change notification settings - Fork 2
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
Figure out how to handle data in keys instead of values #158
Comments
About getting key values: I think the only case where it would make sense to get the keys are when an object of objects work is basically working like a list like the JSONSchema example above or like this: {
"people_by_id": {
"1": {"name": "John", "age": 21},
"2": {"name": "Bob", "age": 21},
"3": {"name": "Roger", "age": 21}
}
} If we have a structure like this, then more likely than not we want that To get something like that to work we need to figure out a way to represent that in a python dict, because that is what we are using internally, then we would also need to decide on a how it should be looked up in a Currently, our iterators makes an object with the given {
"people_item": {
"__key__": "1",
"name": "John",
"age": "21"
}
} That way, the only difference internally between an iterated object and an iterated list of object would be that the former have the |
About dynamically writing key names Lets say that we needed to create that JSONSchema from the following csv:
There are 2 problems. Second problem is that we need to be able to dynamically name these objects. I think that these are two seperate tasks. To be able to iterate over some data and produce a list I think we might want to split the kaiba configs I will start working on some more specific proposals, but these are my initial ideas. Please let me know how you feel about it @ChameleonTartu I think with this you'd be able to map to and from JsonSchema format in #157 |
Some formats have interesting data in key names instead of in values.
For example JSONSchema.
Every child object in
"properties"
is a fields name. That means that it is interesting data.We could argue that if its just a key that we would need to know the path to anyways, we don't need to be able to map it. Which is fair. But the
properties
object could have any amount of children and it definitely feels more like an array than an object.So what do we do?
Maybe we can support iterating over an objects children?
We also need to consider the reverse. What if we wanted to create this JSONSchema data. How should we go about mapping input data into a key name?
The text was updated successfully, but these errors were encountered: