5 min read

Introducing J-NRL: A Unified Language for Representing Normative Texts

J-NRL enables automated compliance checking by providing a structured, machine-readable format for normative text, allowing software to process complex legal documents.
Introducing J-NRL: A Unified Language for Representing Normative Texts
Photo by Micael Navarro / Unsplash

In an increasingly complex world governed by a vast web of laws, regulations, contracts, and internal policies, the need for clear, unambiguous, and machine-readable representations of normative texts is paramount. Today, we're excited to introduce J-NRL (JSON for Normative Representation Language), a novel language designed to bridge the gap between human-readable legal documents and the structured data required for automated compliance, reasoning, and analysis.

The Challenge: Fragmented Approaches to Normative Representation

Existing approaches to formalizing legal and regulatory requirements often fall into different camps. Languages like LegalRuleML offer a structured, XML-based way to represent rules, focusing on deontic logic and logical structures. On the other hand, frameworks like Flint Frames emphasize the interpretation of normative texts by breaking them down into actors, actions, and duties, with a strong link back to the source. Visual notations like Extended Compliance Rule Graphs (eCRG) provide intuitive ways to model compliance within business processes, highlighting relationships and triggers.

However, a unified approach that combines the strengths of these diverse perspectives has been missing. This is where J-NRL comes in.

J-NRL: Combining the Best of Both Worlds

J-NRL is a JSON-based language that draws inspiration from the logical clarity of LegalRuleML, the interpretive focus of Flint Frames, and the relational insights of eCRG. Our goal is to create a format that is:

  • Machine-Readable: Leveraging the simplicity and widespread support of JSON, J-NRL is easily parsable and processable by computers.
  • Human-Understandable: While formal, the structure of J-NRL aims to be intuitive for both legal experts and technical practitioners.
  • Comprehensive: J-NRL can represent various aspects of normative statements, including actors, actions, deontic modalities (obligations, permissions, prohibitions), conditions, consequences, temporal constraints, and exceptions.
  • Traceable: A core feature inspired by Flint Frames, J-NRL explicitly links each normative statement back to its original source text, ensuring interpretability and verifiability.
  • Relational: Drawing from eCRG, J-NRL allows for the representation of relationships between different normative statements, capturing dependencies and exceptions.

Key Concepts of J-NRL

At its heart, J-NRL represents each normative statement as a structured JSON object. Here are the key components:

  • normId: A unique identifier for each normative statement.
  • source: A direct reference to the specific part of the original legal or regulatory text (e.g., "Article 10, Income Tax Act Netherlands").
  • actor: Describes who the norm applies to, including their type (e.g., "NaturalPerson", "Organization") and a more detailed description.
  • action: Specifies the regulated behavior, broken down into a verb and an object.
  • deonticModality: Clearly states the normative force: "Obligation", "Permission", or "Prohibition".
  • condition: Defines the circumstances under which the norm is applicable, including:
    • facts: An array of factual circumstances.
    • timeConstraint: A string describing temporal conditions.
    • location: A string for location-based conditions.
    • constraints: An array of objects, each defining a specific constraint with a property, operator (e.g., ==, >, <=), and value.
  • consequence: Describes the legal effect or outcome, including a potential stateChange and optional sanction details with type and description.
  • temporalConstraints: Specifies when the norm is in effect, including deadline (in YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ format), applicability periods, and exceptions (which can refer to other norms).
  • triggeringEvents: (Inspired by eCRG) An array of strings representing events that initiate the norm's applicability.
  • relatedNorms: (Inspired by eCRG) An array of normId strings representing other normative statements that this one relates to.

Example J-NRL in Action

Let's revisit a previous example, now presented in the full JSON structure:

{
  "normId": "obligation-pay-tax-income-yearly-natural-person-netherlands",
  "source": "Article 10, Income Tax Act Netherlands",
  "actor": {
    "type": "NaturalPerson",
    "description": "Resident of Netherlands"
  },
  "action": {
    "verb": "Pay",
    "object": "Income Tax"
  },
  "deonticModality": "Obligation",
  "triggeringEvents": [
    "End of fiscal year"
  ],
  "condition": {
    "facts": [
      "Has earned taxable income"
    ],
    "timeConstraint": "Within the fiscal year"
  },
  "consequence": {
    "stateChange": "Tax payment received by government"
  },
  "temporalConstraints": {
    "deadline": "2026-04-30"
  }
}

This structured format allows for easy parsing and querying. For instance, you could easily extract all obligations for "NaturalPerson" actors or identify norms with a specific deadline.

The Benefits of J-NRL

By adopting J-NRL, organizations and individuals can benefit from:

  • Improved Clarity and Precision: Formalizing normative texts reduces ambiguity and facilitates a shared understanding.
  • Enhanced Interoperability: The JSON format enables seamless data exchange between different systems and applications.
  • Automation of Compliance Checking: J-NRL provides the structured data necessary for building automated tools that verify compliance against regulations.
  • Support for Legal Reasoning: The explicit representation of conditions, consequences, and relationships lays the groundwork for AI-powered legal reasoning systems.
  • Better Management of Legal Knowledge: J-NRL offers a structured way to organize, search, and analyze complex sets of legal rules.
  • Increased Traceability and Accountability: The link back to the original source ensures that interpretations are grounded in the actual text.

The Future of Normative Representation

J-NRL represents a step towards a more unified and computationally friendly way of dealing with normative texts. We believe that by combining the strengths of existing approaches into a single, accessible format, we can unlock new possibilities for legal technology, compliance automation, and a deeper understanding of the rules that govern our world.

We invite legal experts, software developers, and researchers to explore the J-NRL schema and contribute to its development. Together, we can build a future where legal knowledge is more transparent, accessible, and actionable.

J-NRL JSON Schema Definition

For those interested in implementing and validating J-NRL, here is the JSON schema definition:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "JSON Schema for Normative Representation Language (J-NRL)",
  "description": "Defines the structure for representing normative statements.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "normId": {
        "type": "string",
        "description": "A unique identifier for the normative statement."
      },
      "source": {
        "type": "string",
        "description": "Reference to the original legal or regulatory text."
      },
      "actor": {
        "type": "object",
        "description": "The entity to whom the norm applies.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of actor (e.g., NaturalPerson, Organization, VehicleOperator)."
          },
          "description": {
            "type": "string",
            "description": "A more detailed description of the actor."
          }
        },
        "required": [
          "type"
        ]
      },
      "action": {
        "type": "object",
        "description": "The action regulated by the norm.",
        "properties": {
          "verb": {
            "type": "string",
            "description": "The main action verb."
          },
          "object": {
            "type": "string",
            "description": "The object of the action."
          }
        },
        "required": [
          "verb"
        ]
      },
      "deonticModality": {
        "type": "string",
        "enum": [
          "Obligation",
          "Permission",
          "Prohibition"
        ],
        "description": "The normative status of the action."
      },
      "triggeringEvents": {
        "type": "array",
        "items": {
          "type": "string",
          "description": "Events that trigger the applicability of the norm."
        },
        "description": "Events that trigger the applicability of the norm (inspired by eCRG)."
      },
      "condition": {
        "type": "object",
        "description": "The conditions under which the norm applies.",
        "properties": {
          "facts": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Factual circumstances for the norm's application."
            }
          },
          "timeConstraint": {
            "type": "string",
            "description": "Temporal constraint on the condition."
          },
          "location": {
            "type": "string",
            "description": "Location-based constraint."
          },
          "constraints": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Specific constraints on entities or actions.",
              "properties": {
                "property": {
                  "type": "string",
                  "description": "The property being constrained."
                },
                "operator": {
                  "type": "string",
                  "enum": [
                    "==",
                    "!=",
                    ">",
                    "<",
                    ">=",
                    "<=",
                    "includes",
                    "excludes"
                  ],
                  "description": "The comparison operator."
                },
                "value": {
                  "type": [
                    "string",
                    "number",
                    "boolean"
                  ],
                  "description": "The value to compare against."
                }
              },
              "required": [
                "property",
                "operator",
                "value"
              ]
            }
          }
        }
      },
      "consequence": {
        "type": "object",
        "description": "The legal effect or outcome of the norm.",
        "properties": {
          "stateChange": {
            "type": "string",
            "description": "Change in the state of affairs (inspired by eCRG)."
          },
          "sanction": {
            "type": "object",
            "description": "The sanction for violating the norm.",
            "properties": {
              "type": {
                "type": "string",
                "description": "Type of sanction (e.g., Fine, Imprisonment)."
              },
              "description": {
                "type": "string",
                "description": "Details of the sanction."
              }
            }
          }
        }
      },
      "temporalConstraints": {
        "type": "object",
        "description": "Temporal aspects of the norm's applicability.",
        "properties": {
          "deadline": {
            "type": "string",
            "format": "date-time",
            "description": "The final date or time for an action."
          },
          "applicability": {
            "type": "string",
            "description": "The period during which the norm is in effect."
          },
          "exceptions": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Exceptions to the temporal constraints or the norm itself.",
              "properties": {
                "description": {
                  "type": "string",
                  "description": "Description of the exception."
                },
                "refersToNorm": {
                  "type": "string",
                  "description": "ID of another norm that this exception relates to (inspired by eCRG)."
                }
              },
              "required": [
                "description"
              ]
            }
          }
        }
      },
      "relatedNorms": {
        "type": "array",
        "items": {
          "type": "string",
          "description": "IDs of other related normative statements (inspired by eCRG)."
        },
        "description": "References to other related normative statements."
      }
    },
    "required": [
      "normId",
      "source",
      "actor",
      "action",
      "deonticModality"
    ]
  }
}