Norsh
HomeNTPNCLAPI
HomeNTPNCLAPI
  1. Published
  • Norsh
    • Usage Guide
      • Cryptographic Identity
    • API
      • Crypto
        • Generates a public and private key pair
        • Generates an address from a public key.
  • NTP - Norsh Technical Paper
    • LICENSE-NCL-11
    • Published
      • NTP-1: Norsh Technical Paper Specification
      • NTP-2: Standards for Encoding, Time and Localization
      • NTP-3: Cryptography and Hash Specification
      • NTP-4: Interchangeable Data Standard
      • NTP-5: Temporal Time-Step Model
      • NTP-6: Modular Prime Fragmentation
      • NTP-7: The End of Mining - PoW
      • NTP-8: The Fallacy of Stake - PoS
      • NTP-9: The Myth of Absolute Non-Censorship
      • NTP-10: Structural Failures of Decentralization
  • NCL - Norsh Commons License
    • NCL-0: Norsh Commons License
    • NCL-1: Attribution Requirement
    • NCL-2: Restricted Commercialization
    • NCL-4: Commercialization with Agreement or Royalties
    • NCL-8: Educational Use Permission
    • NCL-16: Complementary Use and Integration Permission
    • NCL-32: Pre-Approval for Application Publication
    • NCL-64: Restricted or Authorized Derivatives
    • NCL-128: Contribution Terms
  1. Published

NTP-4: Interchangeable Data Standard

Status: PUBLISHED
Authors: Danthur Lice
Date of Creation: 2025-01-15
Date of Publication: 2025-01-15
References: NTP-2
License: NCL-11

1. Scope#

This document defines the technical specification for interchangeable data formats within the Norsh ecosystem. It mandates the exclusive use of UTF-8 encoded JSON as the universal structure for data exchange across all operational layers, including internal APIs, smart elements, blockchain ledgers, audit exports, and external integrations. The standard ensures syntactic uniformity, encoding determinism, and interoperability for all actors and systems, regardless of jurisdiction or implementation context.
The specification is not limited to blockchain environments and applies uniformly to any software architecture operating under the Norsh ecosystem’s compliance scope, including both public and private deployments.

2. Normative Principles#

The interoperability of a distributed ecosystem depends on predictable structure, deterministic encoding, and format invariance. JSON, when enforced under strict conventions, provides the minimal deterministic unit for structured data exchange. Any deviation—such as lax field naming, variable timestamp formats, ambiguous encoding, or embedded binaries—compromises auditability, security, and verifiability.
It is technically necessary that:
The same payload must result in identical binary representation across platforms when re-serialized.
All timestamps must be machine-verifiable, timezone-agnostic, and mathematically derivable to epoch without parsing ambiguity.
Any embedded content with variable encoding (e.g., raw binary) must be abstracted through deterministic base representations.
This standard extends and complements NTP-2, which governs time, localization, encoding, and binary representation rules.

3. Preconditions and Scope Constraints#

This standard presupposes:
UTF-8 compliance at all serialization and transport layers (file, API, message bus, logs).
ISO 8601 as the only valid timestamp encoding.
JSON Schema or formally equivalent structure validation prior to state commitment or cryptographic processing.
Interchangeable data to be used in zero-trust environments, where every byte must be verifiable and replayable.
Systems that lack deterministic encoding or allow uncontrolled field injection are incompatible with this NTP.

4. Technical Specification#

4.1 Format and Encoding#

All data structures must be serialized as UTF-8 without BOM.
JSON is the exclusive format for structured data. YAML, XML, protobuf, or hybrid models are prohibited in the context of interoperability or state commitments.

4.2 Escaping and Character Normalization#

All control characters and reserved syntactic symbols must follow strict JSON escaping rules:
CharacterEscaped
Newline\n
Tab\t
Quote\"
Backslash\\
Unicode characters outside ASCII range must be preserved as-is unless required by protocol-specific constraints, in which case \uXXXX escaping is allowed. No control characters below 0x20 are permitted unescaped.

4.3 Key Naming and Sensitivity#

Field names are case-sensitive and must follow the camelCase convention.
userId, userID, and UserId are different and must not be conflated by any parser or schema.
Use of snake_case, PascalCase, or kebab-case is prohibited in all machine-readable fields.

4.4 Timestamps and Epoch Representation#

Timestamps must follow the ISO 8601 extended format in UTC:
YYYY-MM-DDTHH:mm:ss.sssZ
All timestamp data must include milliseconds. Omission of fractional seconds is invalid.
Epoch-based timestamps must be represented as integer milliseconds since 1970-01-01T00:00:00Z. Seconds or alternate epochs are prohibited.
Systems requiring sub-millisecond resolution must use nanosecond integers as duration fields—not absolute time.
Example (valid):
"createdAt": "2025-01-01T00:00:00.000Z"  
"duration": 1250000000 // nanoseconds

4.5 Numeric Format and Precision#

All numeric fields must use full precision with no truncation, rounding, or scientific notation.
Decimal separator: . (dot)
Thousands separator: , (comma), only in human-readable outputs such as logs or reports.
Machine-readable fields must not contain grouping characters.
Examples:
Valid: 1234567.89
Invalid: "1.23e6", "1.234.567,89"

4.6 Boolean and Null Semantics#

Only the canonical literals are permitted: true, false, null
The following must be rejected: "yes", "no", "undefined", "None", 0, 1 (as booleans)

4.7 Whitespace, Indentation, and Formatting#

Systems must support both compact and indented JSON.
When indented, the standard is 2-space indentation per level.
Tabs, excessive padding, or inconsistent spacing must be normalized or rejected.

4.8 Base64 for Binary Embedding#

Binary content is strictly prohibited in raw format.
Fields containing binary data must be encoded using Base64 and described explicitly in the schema.
Compression or encryption applied to content prior to Base64 must be reversible and deterministic.
Example:
"signature": "MEUCIQD+FqTZ/…" // Base64-encoded, not raw binary
Binary format must comply with NTP-2 §3.8.

4.9 Unknown Fields and Forward Compatibility#

Unknown fields must be ignored by default, unless strict validation is explicitly declared.
All structured formats must be versioned when field semantics or rules are expected to evolve.

5. Implementation Requirements#

The following components must mandatorily implement and enforce this specification:
All JSON-based APIs (internal and external)
Smart Element schemas and payloads
Ledger entries and on-chain records
Structured logs and exported audit files
Configurations, snapshots, and replicable system state dumps
Any deviation invalidates interoperability guarantees, and must be considered a non-conformant behavior under audit.

6. Conclusion#

The interchangeable data format established in this document is not a suggestion; it is a foundational prerequisite for verifiability, reproducibility, and audit traceability within the Norsh ecosystem. JSON, when enforced with structural discipline and encoding determinism, is sufficient to sustain the operational integrity of distributed protocols, smart element governance, and data lineage.
Ecosystem participants must adopt this standard in its entirety. Partial implementations, format leniencies, or semantic ambiguities introduce systemic risk and break the guarantees of distributed synchronization and cryptographic assurance.
Modified at 2025-05-29 16:14:15
Previous
NTP-3: Cryptography and Hash Specification
Next
NTP-5: Temporal Time-Step Model
Built with