Wire Format
The wire format describes the way entities are serialized to JSON.
Here is some sample code that dumps the entire iModel to JSON.
Below are examples of wire formats for a few interesting iTwin.js classes.
Root Subject
The following code:
Produces the following result:
RepositoryModel
The following code:
Produces the following result:
GeometricElement3d
The following code produces JSON at various stages on the way to creating a GeometricElement3d
:
Arc3d JSON
Below is the JSON from the Arc3d
:
LineString3d JSON
Below is the JSON from the LineString3d
:
GeometryStream JSON
Below is the JSON from the GeometryStream
that contains the Arc3d
and LineString3d
that were previously created.
This shows that a GeometryStream
is just an array of entries:
Placement3d JSON
Below is the JSON from the Placement3d
that will be used to place the GeometryStream
in world coordinates:
GeometricElement3d JSON
Below is the JSON from the GeometricElement3d
.
This shows that the JSON from the GeometricElement3d
contains the JSON from the objects used to create it:
Last Updated: 11 June, 2024