LuciadCPillar 2026.1.02
Loading...
Searching...
No Matches
luciad::JsonDataAnnotation Class Referencefinal

DataAnnotation that marks a string-typed DataProperty as holding JSON text. More...

#include <luciad/datamodels/JsonDataAnnotation.h>

Inheritance diagram for luciad::JsonDataAnnotation:
luciad::DataAnnotation

Public Member Functions

size_t getHash () const override
 Returns the hash code.
bool operator!= (const DataAnnotation &other) const override
bool operator== (const DataAnnotation &other) const override
Public Member Functions inherited from luciad::DataAnnotation
virtual ~DataAnnotation ()=default

Static Public Member Functions

static bool isPresent (const DataProperty &property)
 Returns whether the given data property is annotated as holding JSON text.

Detailed Description

DataAnnotation that marks a string-typed DataProperty as holding JSON text.

It lets a consumer distinguish a plain string property from properties with JSON string values, for example a property that a decoder could not map to a typed property and preserved as raw JSON text.

This is a flag-style annotation: all instances compare equal. Attach it to a DataProperty with the value type DataType::getStringType() through DataProperty::Builder::addAnnotation.

Since
2026.1

Member Function Documentation

◆ getHash()

size_t luciad::JsonDataAnnotation::getHash ( ) const
overridevirtual

Returns the hash code.

Returns
the hash code.

Implements luciad::DataAnnotation.

◆ isPresent()

bool luciad::JsonDataAnnotation::isPresent ( const DataProperty & property)
static

Returns whether the given data property is annotated as holding JSON text.

Parameters
propertythe data property to check.
Returns
whether the property carries a JsonDataAnnotation.

◆ operator!=()

bool luciad::JsonDataAnnotation::operator!= ( const DataAnnotation & other) const
overridevirtual

◆ operator==()

bool luciad::JsonDataAnnotation::operator== ( const DataAnnotation & other) const
overridevirtual