> For the complete documentation index, see [llms.txt](https://navixy.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://navixy.com/docs/iot-logic-api/technologies/navixy-generic-protocol/data-types-and-encoding-standards.md).

# Data types and encoding standards

Navixy Generic Protocol messages use standard JSON with a defined set of field types. This page specifies how each type maps to JSON, how timestamps must be formatted, and how binary payloads should be encoded before transmission. Knowing these constraints helps you construct valid messages and avoid silent discard due to type mismatches or encoding errors.

## Data types

| **Type**  | **JSON** | **Description**                                    | **Examples**                                               | **Limitations**                                        |
| --------- | -------- | -------------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------------ |
| Integer   | Number   | Whole numeric values, no decimals                  | Bitmasks, counters, impulse counts, passenger counts, RPM  | Signed or unsigned, 1–8 bytes                          |
| Float     | Number   | Numeric values with decimal precision              | Coordinates, speed, altitude, mileage, voltage             | IEEE 754 signed float, up to 8 bytes                   |
| String    | String   | UTF-8 encoded text                                 | Driver name, registration plate, driver ID                 | Up to 10 KB                                            |
| Boolean   | Boolean  | `true` or `false`                                  | Ignition state, door state, presence of movement           | `true` or `false` only                                 |
| Timestamp | String   | ISO 8601 date-time in UTC                          | Message time, GNSS fix time                                | Must be valid ISO 8601 UTC                             |
| Blob      | String   | Binary data, Base64-encoded                        | Photos, raw sensor data, BLE payloads, audio               | Up to 1 MB encoded                                     |
| Mixed     | Any      | Value of any JSON type                             | Custom attributes where type varies by attribute           | Follows the type constraints of the specific attribute |
| Array     | Array    | Ordered list of objects of the same structure      | `mobile_cells`, `wifi_points`                              | No size limit                                          |
| Object    | Object   | Named set of attributes grouped under a single key | `location`, individual mobile cell, individual Wi-Fi point | No size limit                                          |

## Timestamps

All timestamps must use **ISO 8601 UTC** format.

```
"message_time": "2024-09-02T23:59:59Z"
```

The trailing `Z` indicates UTC. Timezone offsets are not supported. Always convert to UTC before sending.

## Binary data

For raw payloads such as sensor data, tachograph logs, images, or audio, binary content must be **Base64-encoded** and sent as a string value.

```json
{
  "my_sensor_data": "SGVsbG8gd29ybGQh",
  "tachograph_log": "U29tZSB0YWNoZW9nIGxvZw==",
  "photo": "/9j/4AAQSkZJRgABAQEAYABgAAD...",
  "audio": "UklGRjIAAABXRUJQVlA4WAoAAAAQAAAA..."
}
```

{% hint style="warning" %}
NGP is not optimized for large binary payloads. The 1 MB limit per encoded blob applies per attribute. Avoid sending multiple large blobs in a single message.
{% endhint %}

Continue reading to learn about [Message structure and attributes](/docs/iot-logic-api/technologies/navixy-generic-protocol/message-structure-and-attributes.md) in Navixy Generic Protocol.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://navixy.com/docs/iot-logic-api/technologies/navixy-generic-protocol/data-types-and-encoding-standards.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
