Skip to content

    Key-value pair

    Data integration & searchKey/value pairName-value pair
    Reading time: 2 min.Editorially reviewed on:

    Definition

    A key names information, the associated value contains its content.

    A key-value pair assigns a value to a named key, for example status: open. Such assignments occur in configurations, data formats, and programs. Which data types and multiple keys are allowed is defined by the respective format; in JSON, object names should be unique.

    Simply explained

    A labeled compartment is called color and contains blue. The label is the key, the content is the value.

    Why it matters in practice

    Unique assignments make it easier for companies to transfer structured data and help consistently connect information between forms, interfaces, and internal systems.

    Example from business

    Possible example: An interface transmits the pairs status: open and priority: high to a process so that the target system processes both pieces of information separately.

    Limits and pitfalls

    • Confused data types and inconsistent key names cause errors. Duplicate names can be handled differently by each processing system, especially in JSON.

    Origin & history

    Key-value mappings are a fundamental structural principle of digital data; JSON standardizes a concrete representation as named components of objects.

    Use in mid-sized companies

    • A company can document binding field names, data types, and permissible values for interfaces and validate received data against these agreements before further processing.

    Frequently asked questions

    Is a key-value pair always text?

    No. The key names the information; the value can also be a number, a boolean, or another structure depending on the format.

    Sources

    Editorially reviewed on:

    On this page

    Next step

    Put knowledge into practice