JSON encoders for the core OpenSolid types.
Encode a Vector3d as a list of three floating-point components.
Encode a Direction2d as a list of two floating-point components.
Encode a Direction3d as as a list of three floating-point components.
Encode a Point2d as as a list of two floating-point coordinates.
Encode a Point3d as as a list of three floating-point coordinates.
Encode an Axis2d as an object with originPoint and direction fields.
Encode an Axis3d as an object with originPoint and direction fields.
Encode a Plane3d as an object with originPoint and normalDirection
fields.
Encode a Frame2d as an object with originPoint, xDirection and
yDirection fields.
Encode a Frame3d as an object with originPoint, xDirection, yDirection
and zDirection fields.
Encode a SketchPlane3d as an object with originPoint, xDirection and
yDirection fields.
Encode a LineSegment2d as a list of two endpoints.
Encode a LineSegment3d as a list of two endpoints.
Encode a Triangle2d as a list of three vertices.
Encode a Triangle3d as a list of three vertices.
Encode a BoundingBox2d as an object with minX, maxX, minY and maxY
fields.
Encode a BoundingBox3d as an object with minX, maxX, minY, maxY,
minZ and maxZ fields.
Encode a Polyline2d as a list of points.
Encode a Polyline3d as a list of points.
Encode a Polygon2d as a list of points.
Encode a Circle2d as an object with centerPoint and radius fields.
Encode a Vector2d as a list of two floating-point components.