-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Some formats have interesting data in key names instead of in values.
For example JSONSchema.
{
"$id": "https://example.com/person.schema.json",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Person",
"type": "object",
"properties": {
"firstName": {
"type": "string",
"description": "The person's first name."
},
"lastName": {
"type": "string",
"description": "The person's last name."
},
"age": {
"description": "Age in years which must be equal to or greater than zero.",
"type": "integer",
"minimum": 0
}
}
}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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request