You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was having a chat with @jacogr and we had the idea to conceptualize certain common structures in the generated JSON SCALE info.
For example we conceptualize the structure of mapping types.
A mapping type encodes as a sequence over some other type that has a key and value field. That's it. Below you can see the JSON that could conceptualize such a scenario concretely. Note that it might be nice to have so-called Voldemord composites that do not have a name since it isn't needed here. We just generate the type at index 1 upon serialization and will never need its name.
{
names: [
"BTreeMap", # ID: 1
"KeyValue", # ID: 2
"K", # ID: 3,
"V", # ID: 4,
"key", # ID: 5,
"value", # ID: 6,
]
types: [
{ # ID: 1
composite: {
path: [ 2 ], # We actually don't need this.
# Could we define composite types without names?
# Does that make sense at all? It would be similar
# to the concept of Voldemord types.
fields: [
{ name: 5, type: 4 },
{ name: 6, type: 5 },
]
}
},
{ # ID: 2
sequence: {
type: 1
}
},
{ # ID: 3
composite: {
path: [ 1 ],
params: [ 4, 5 ],
fields: [
type: 2
]
}
},
...
],
}
The text was updated successfully, but these errors were encountered:
ascjones
changed the title
Conceptualize common structures (e.g. key/value mappings)
Support "Voldermort" types for common structures (e.g. key/value mappings)
Apr 1, 2020
ascjones
changed the title
Support "Voldermort" types for common structures (e.g. key/value mappings)
Support "Voldemort" types for common structures (e.g. key/value mappings)
Apr 3, 2020
Following up on #3, required before cutting a
0.1
release. From @Robbepop #3 (comment)I was having a chat with @jacogr and we had the idea to conceptualize certain common structures in the generated JSON SCALE info.
For example we conceptualize the structure of mapping types.
A mapping type encodes as a sequence over some other type that has a
key
andvalue
field. That's it. Below you can see the JSON that could conceptualize such a scenario concretely. Note that it might be nice to have so-called Voldemord composites that do not have a name since it isn't needed here. We just generate the type at index 1 upon serialization and will never need its name.The text was updated successfully, but these errors were encountered: