Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Dynamic Typing Serialization

Rafael Weinstein edited this page Apr 22, 2016 · 2 revisions

Dynamic typing requires that every value in dataset can have a distinct type. In effect, every collection will become as collections of Value are now, in the sense each individual element is tagged with its type, but the collection type will be the union of the distinct set of element types. IOW

List<Value> = [3, "foo", true] will become List<number | string | boolean> = [3, "foo", true]

The general plan for this is that all values (recursively) are serialized as [Type Serialization][Value Serialization].

So the example above would be something like:

[
  [Type],
  [List,
    [Type,
      Union, [
        3, // Union-type count
        [Type, Number], [Type, String], [Type, Boolean]]
    ]
  ]     
] 
[
  3, // List-element count
  [[Type][Number]][3], 
  [[Type][String]]["foo"], 
  [[Type][Boolean]][true]
]
Clone this wiki locally