The package file is a JSON file with an array of “objects”, each object representing a package. The table below describes the fields for a single package. The file uses the UTF-8 character set.
Fields that are not relevant for a particular package may be omitted. For example, the “exposed-pad” field is irrelevant for a 2-pin “chip” package, and it is usually not recorded. Likewise, for packages with “endcap” or “no-lead” terminations, the lead-to-lead size is identical to the body size, and it is then sufficient to record the body size.
For fields that have an array type, if that array has no elements, the field may also be set to null. For example, when a package has no variants, the “variants” field may be set to null, rather than an empty array. Still, the preferred way to handle this case is to not include the “variants” field at all.
Field | Type | Description |
---|---|---|
date-modified | string | date and time stamp of the last update to the package, in the form YYYY-MM-DDTHH:MM:SS (the letter ?T? is a literal; it is the separator between the date and the time). |
names | array of strings | common names |
description | string | optional brief description |
type | string | “SMD” or “Through-hole” |
pin-count | integer | number of pins or leads of the package |
pitch | number | pin pitch in mm, if applicable |
polarized | boolean | true or false (may be absent if irrelevant) |
terminal | string | one of the following: “endcap”, “gull-wing”, “inward-L”, “lug-lead”, “J-lead”, “no-lead”, “ball”, “castellated” or “through-hole” |
tape-orientation | integer | angle between packaging orientation (EIA-481D) and normative zero-orientation (IPC-7351), in degrees |
body | object | body size (excluding pins) and centroid |
· cx, cy | number | nominal horizontal and vertical dimensions in mm |
· tol.x, tol.y | number | optional tolerance for the horizontal and vertical dimensions in mm |
· x, y | number | offset of the body centre from the centroid |
lead‑to‑lead | object | lead-to-lead” size and centroid (see Figure 2) |
· cx, cy | number | lead-to-lead nominal horizontal and vertical dimensions in mm |
· tol.x, tol.y | number | optional tolerance for the horizontal and vertical dimensions in mm |
· x, y | number | offset of the shape centre from the centroid |
references | array of objects | body size (excluding pins) and centroid |
· standard | string | name or identification of the reference |
· organization | string | organization that established the reference |
related‑packages | array of strings | names of other packages in the package file to which this package is related |
variants | array of objects | list of specific variants of the common name |
· name | string | the (normative) name of the variant |
· standard | string | name of the standard or convention (if any) |
· height | object | the height range of the variant in mm |
· · low | number | minimum height in mm |
· · high | number | maximum height in mm |
· exposed‑pad | boolean | whether this variant has an exposed-pad |
· notes | string | optional comment or notes |
footprints | array of objects | list van footprints |
· type | string | one of “nominal”, “least” or “most”, according to the specification in IPC-7351 |
· span | object | distance between pads in opposing rows (see Figure 4) |
· · cx, cy | number | distance in mm |
· contour | object | footprint contour and centroid (see Figure 2) |
· · cx, cy | number | contour horizontal and vertical dimensions in mm |
· · x, y | number | offset of the contour centre from the centroid |
· pad‑shapes | array of objects | list of unique pad shapes and sizes used in the footprint |
· · pad-id | integer | sequence number of the pad shape definition |
· · cx, cy | number | horizontal and vertical dimensions of the pad in mm |
· · shape | string | one of “rectangle”, “round”, “roundedrect”, “obround”, “polygon” or “special” |
· · exposed‑pad | boolean | whether this pad represents an exposed centre pad (for variants that have an exposed-pad) |
· · hole | number | diameter of the hole in the pad (applicable for through-hole packages) |
· · x, y | number | offset of the pad origin relative to the pad’s geometric centre |
· pad‑positions | array of object | list of the pad positions |
· · pin-id | integer | pin number |
· · pad-id | integer | reference to the pad shape for this pin |
· · x, y | number | position of the pad origin, relative to the centroid position of the footprint |
· · rotation | number | rotation of the pad shape, relative to the definition in the pad-shapes array |
For the pad shape, a square pad is stored as a “rectangle” shape; the cx and cy parameters will establish that it is square. The radius for the rounded corners of a “roundedrect” shape is not specified; in the scope of Packages, the intent is to flag the pad shape as an intermediate form between rectangle and obround.
All coordinates assume that in the 2D projection, the Y-axis points upwards. This is in conformance with the Gerber standard. Some design programs use a downward Y-axis —a common convention in the early days of computing. Such programs should flip the sign on Y coordinates on reading the data from the JSON file.