JCR

JSON Content Rules

Protocol →
Introduced in Rel-13

JCR is a formal language for specifying the structure, constraints, and validation rules for JSON data in 3GPP network APIs and service interfaces to ensure consistency and interoperability.

Category
Protocol
Introduced
Rel-13
Where
Core Network › 5G Core
Specifications
1 specs
JCR Description Purpose Related Classification Specifications

Description

JSON Content Rules (JCR) is a specification language standardized by 3GPP, primarily documented in TS 29.155. It defines a syntax and semantics for creating rules that describe the expected structure and content of JSON documents. These rules act as a schema, specifying allowed data types (e.g., strings, numbers, booleans, arrays, objects), mandatory and optional fields, value constraints (e.g., ranges, patterns, enumerations), and nesting relationships. In practice, JCR rules are textual definitions that can be processed by validation engines. A network function or API gateway can use a JCR validator to check incoming or outgoing JSON messages against the predefined rules, ensuring they conform to the expected format before further processing. This validation is crucial for preventing malformed data from causing errors in service logic or interoperability issues between systems. The language supports complex constructs like conditional rules (e.g., if a field 'serviceType' is 'VoLTE', then another field 'codec' must be present), references for reusing common rule definitions, and annotations for documentation. Its role in the 3GPP ecosystem is to provide a machine-readable contract for data exchange, particularly in Service-Based Interfaces (SBIs) within the 5G Core network, where APIs extensively use JSON. By formalizing data expectations, JCR reduces integration effort, aids in automated testing, and enhances the reliability of network service interactions.

Purpose & Motivation

JCR was created to address the growing use of JSON as the primary data interchange format in modern, web-oriented network architectures, specifically the 5G Service-Based Architecture (SBA). Prior approaches often relied on informal documentation or proprietary schema definitions, leading to inconsistencies, integration errors, and increased development time for network function vendors and application developers. The motivation stemmed from the need for a standardized, vendor-neutral way to define the precise structure of JSON payloads used in 3GPP-defined APIs, such as those between Network Repository Functions (NRF), Network Exposure Functions (NEF), and other core network elements. By providing a formal rule language, 3GPP aimed to ensure that all implementations interpret API data contracts identically, thereby solving interoperability problems that could arise from ambiguous specifications. It also facilitates automated tooling for code generation, documentation, and validation, streamlining the development and testing lifecycle for 5G network software. Historically, similar needs in other protocols were met by languages like ASN.1 or XML Schema, but JCR is tailored for the JSON format's simplicity and prevalence in RESTful APIs, aligning with the industry shift towards web technologies in telecommunications.

Classification

Part ofJSON

Evolution Across Releases

Rel-13 Initial

JCR was initially introduced in Release 13 within TS 29.155. The initial architecture defined the core JCR language syntax, including rules for primitive types, arrays, objects, and basic constraints. It established the foundational capability for validating JSON structures used in early 3GPP service interfaces, providing a standardized alternative to ad-hoc JSON descriptions.

Explore further

Broader topics and technologies where JCR plays a role.

Defining Specifications

3GPP specifications that define or reference JCR, with the latest known release. Sourced from the 3GPP document catalog — see methodology.

SpecificationTitleRelease
TS 29.155 vj00 REST-based St Reference Point Protocol Rel-19
Patrick Zandl

About the author: Patrick Zandl (b. 1974)

Telecommunications specialist, technology journalist (founder of the Mobil server), and developer who has been running since 2025 — the largest Czech-language resource on AI-assisted programming. Formerly Chief Wizard Architect at Prusa3D and head of development for Turris at CZ.NIC; currently a consultant and instructor on AI implementation in companies.