-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
Milestone
Description
The current JSON structure for package:record_use only supports string keys for MapConstant objects. The keys are serialized directly as strings, while the values are normalized as indices into the constants array. This limits the ability to represent const maps that use other constant types (e.g., int, bool, or other objects) as keys.
Current Format:
{
"type": "map",
"value": {
"key1": 3
}
}Proposed Format options:
{
"type": "map",
"value": {
"1": 3,
"2": 4
}
}{
"type": "map",
"value": [
{ "key": 1, "value": 3 },
{ "key": 2, "value": 4 },
]
}Note that this does not allow for an efficient JSON view with #2681, so the map keys need to be eagerly looked up from the constants array on building the view.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo