JSON Mapping Documentation

This page details how fields from an imported JSON file are mapped to the fields in the CostMater UI.

Component Details

Basic information about the component.

JSON Field PathUI FieldNotes
FileComponent NameThe filename from the JSON is used as the component name.
ShapeType.TypeShapee.g., "Flat" is mapped to the "Flat" shape.
Material.TypeMateriale.g., "MS" is mapped to the "MS" material. "Aluminum" is mapped to "AL".
Dimensions.LengthDimensions - Length / Bar LengthMapped directly. For `Round Bar` and `Round Tube`, this maps to `Bar Length`.
Dimensions.WidthDimensions - WidthMapped directly.
Dimensions.ThicknessDimensions - ThicknessMapped directly.
Dimensions.DiameterDimensions - DiameterUsed for `Round Bar` shape.
Dimensions.OuterDiameter / InnerDiameterDimensions - Outer/Inner ØUsed for `Round Tube` shape.

Features & Operations

Details on how manufacturing features are mapped to operations.

Laser Cutting Operations

JSON Field PathUI OperationNotes
Features.LaserCuts.CutsLaser Cutting ProfileEach item in this array creates one Laser Cutting profile. The `Shape` (e.g. "Slot") is used as the profile type.
...Cuts[].Details.LengthProfile Length/BaseMapped to the primary length dimension of the profile.
...Cuts[].Details.WidthProfile WidthMapped to the width dimension of the profile.

Bending Operations

JSON Field PathUI OperationNotes
Features.Bends.BendsDimensional BendEach item in the array creates one "Dimensional Bend" operation.
...Bends[].LengthBend LengthMapped to the "Length" input for the bend.

Drilling Operations

JSON Field PathUI OperationNotes
Features.Machining.Machining.DrillingDrilling OperationEach item in this array creates a "Drilling" machining operation.
...Drilling[].DiameterDiameterMapped to the "Diameter" input for the drilling operation.

Milling Operations

JSON Field PathUI OperationNotes
Features.Milling.Milling.PocketMillingPocket MillingEach item in the array creates a "Pocket Milling" operation.
Features.Milling.Milling.SlotMillingSlot MillingEach item in the array creates a "Slot Milling" operation.
...Milling[].LengthLengthMapped to the "Length" input for the operation.
...Milling[].WidthWidthMapped to the "Width" input for the operation.

Turning Operations

JSON Field PathUI OperationNotes
Machining.Machining.StepTurning
Machining.Machining.IDTurning
Machining.Machining.ODTurning
Turning OperationEach item in these arrays creates a corresponding turning operation (e.g., "Step Turning").
...[].CutLengthLengthMapped to the operation's "Length" input.
...[].BeforeDiameterStart ØMapped to the operation's "Start Ø" input.
...[].AfterDiameterEnd ØMapped to the operation's "End Ø" input.

Unmapped Fields

This is a list of known fields in the JSON that are intentionally not mapped, along with the reason.

JSON Field PathReason for Not Mapping
Dimensions.Length (for non-round shapes)If the shape is not `Round Bar` or `Round Tube`, this value is not used for `barLength`.
Dimensions.OuterDiameter / InnerDiameterDiameter fields are only applicable for round shapes (e.g., Round Bar, Round Tube). They are ignored if the base `ShapeType` is not round.
Features.Bends.Bends[].Angle (deg)The application does not use the bend angle in its cost calculations.
Features.Bends.Bends[].RadiusBend radius is not a factor in the current cost calculation logic.
Features.Milling.Milling[].DepthCutting depth is calculated automatically based on tool, material, and pass type (Rough/Finish), not set by direct input.
Features.Machining.Machining.Drilling[].DepthThe `Depth` is marked "Unavailable" in the source JSON. The app will default to a length of 0.
...Location or ...PositionThe X, Y, Z coordinate data for features is not used in cost calculations.
ManufacturingMethodThere is no field in the UI to store the manufacturing method.
Logic, Confidence, Source, etc.Metadata fields from the JSON are ignored as they are not relevant to cost estimation.