<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>JSON towards a simple Ontology and Rule Language</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Kevin Angele</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jurgen Angele</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Semantic Technology Institute Innsbruck Department of Computer Science, University of Innsbruck</institution>
          ,
          <addr-line>Innsbruck</addr-line>
          ,
          <country country="AT">Austria</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>adesso, Competence Center Arti cial Intelligence</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>In recent years knowledge graphs gained much attention. Many big companies, like Amazon, Facebook, or Google, are building a knowledge graph. This movement also a ected smaller companies, as a growing number of those ask for knowledge graph solutions or start to build them themselves. The Semantic Web provides a long list of knowledge representation formalisms and ontology languages to build knowledge graphs. Those formalisms and languages cover a broad range of computational complexity, from simple to even undecidable. Focusing on the manifoldness of companies building knowledge graphs, a language that many people understand and accept is intended. Therefore, we present an alternative approach to existing knowledge representation formalisms and ontology languages based on JSON. JSON is the most popular format for exchanging information between systems. Also, JSON comes with its schema language called JSON Schema, allowing to de ne the structure of a given JSON document. Our paper provides an ontology language based on JSON Schema and extends it by inheritance, arbitrary relationships between di erent JSON documents (classes), and rules. The rules are based on OO-logic, a successor of F-logic, and are seamlessly embedded. As we see in our current projects, this language is quickly adopted and used by software developers.</p>
      </abstract>
      <kwd-group>
        <kwd>Ontologies</kwd>
        <kwd>JavaScript Object Notation (JSON)</kwd>
        <kwd>JSON Schema</kwd>
        <kwd>JSON-LD</kwd>
        <kwd>OO-logic</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Data has become an essential asset for many companies worldwide. Gartner1 pre</title>
      <p>
        dicts that \Data and analytics will become the centerpiece of enterprise strategy,
focus and investment" [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. When it comes to managing and integrating data,
maybe also from heterogeneous sources, knowledge graphs come into play. In
Gartner's Hype Cycle from 2020, knowledge graphs were listed on top of the peak
(\Peak of In ated Expectation")[
        <xref ref-type="bibr" rid="ref12">12</xref>
        ]. Many big companies (like Amazon,
Facebook, Google, or Microsoft) build knowledge graphs containing vast amounts of
data. Also, smaller companies want to use knowledge graphs to power their
systems. For building knowledge graphs, the Semantic Web provides many ontology
languages and knowledge representation formalism. Besides simple concepts also
undecidable ones are provided. For many use cases, companies face, those
ontology languages or knowledge representation formalisms might be overly complex
with a steep learning curve. Therefore, an ontology language based on an
existing widespread format is required with a at learning curve allowing companies
to de ne their knowledge graphs.
      </p>
    </sec>
    <sec id="sec-2">
      <title>A widespread format that is used for exchanging data between systems2 is</title>
    </sec>
    <sec id="sec-3">
      <title>JSON [5]. JSON comes along with a schema language called JSON Schema3</title>
      <p>
        [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. JSON Schema is intended to be a vocabulary to annotate and verify JSON
documents (JSON-Schema for JSON is like RDFS [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] for RDF [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]). JSON Schema
is used as a basis for our proposal of a bottom-up enhancement of JSON towards
a simple ontology language. JSON-Schema is still in design, and therefore the
paper is based on the latest draft version (2020-124).
      </p>
      <p>
        In order to provide an alternative to existing ontology languages, we
provide an ontology language based on JSON-Schema that extends JSON-Schema
with complex constraints, inheritance, relationships, and rules. JSON Schema
provides constraints for single property values only. In this paper, inheritance
is introduced, as it is not provided by JSON Schema so far. Inheritance is
divided into a top-down and a bottom-up part. Top-down speci es that subtypes
inherit all properties from the supertype, and bottom-up de nes that instances
of subtypes are also instances of supertypes. JSON Schema can not yet handle
relationships between di erent JSON documents (classes). However, for
modeling ontologies, this is an essential requirement. Finally, to be able to reason over
the given data, rules must be provided. Therefore, JSON Schema is extended
to be usable with OO-Logic [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] rules. The ease of using the extension of JSON
Schema towards an ontology language is motivated by a demonstration of a use
case.
      </p>
      <p>To begin with, we present preliminaries relevant to understand the concepts
introduced within this paper. The preliminaries include a brief introduction to
1 www.gartner.com
2 https://www.cs.tufts.edu/comp/150IDS/final_papers/tstras01.1/</p>
      <p>FinalReport/FinalReport.html#software
3 http://json-schema.org
4 https://json-schema.org/speci cation.html
JSON, JSON-LD, and JSON Schema. In Section 3, extensions for JSON Schema
towards a simple ontology language are introduced. Then, rules that make use
of the JSON data are described. Afterward, we present a use case using the
extensions of JSON Schema and the rules. The last but one section (Section 6)
mainly introduces SHACL, which is comparable to JSON Schema and brie y
also other rule languages present in the Semantic Web. Finally, we conclude our
paper and give an outlook on future work.
2</p>
      <sec id="sec-3-1">
        <title>Preliminaries</title>
        <p>The proposal of this paper is based on an adaptation of JSON Schema, a schema
language for JSON. In order to follow the extensions made, we will present the
basic terms used within this paper. Therefore, we brie y introduce JSON and
JSON-LD, and afterward, relevant concepts of JSON Schema are introduced.
2.1</p>
        <sec id="sec-3-1-1">
          <title>JSON and JSON-LD</title>
          <p>
            JavaScript Object Notation (JSON) [
            <xref ref-type="bibr" rid="ref5">5</xref>
            ] is designed to be a text format for
the serialization of structured data. JSON is used as a lightweight,
languageindependent data interchange format on the Web. Nowadays, many Web APIs
provide JSON as a response format. The JSON speci cation provides a small
set of formatting rules for structuring the data. In general, JSON allows four
primitive types and two structured types. The primitive types are string,
number, boolean, and null. Objects, an unordered collection of name-value pairs, and
arrays, an ordered sequence of values (either of primitive type or object), are
the structured values. JSON was designed to be minimal, portable, textual, and
to be a subset of JavaScript.
          </p>
          <p>
            JSON-LD [
            <xref ref-type="bibr" rid="ref13">13</xref>
            ] is an extension of JSON to be used for serializing Linked
Data. Machine interpretable data linked across di erent documents may also be
stored in di erent Websites, referred to as Linked Data. Documents stored across
the Web can be accessed by following links going out of the current document.
JSON-LD is a lightweight syntax to serialize Linked Data based on the
previously introduced JSON format. Only minimal changes are made to JSON, and
therefore JSON-LD is 100% compatible with JSON. This allows reusing tools
and libraries that already work with JSON. On top of JSON, JSON-LD
introduces a universal identi er mechanism to identify JSON objects using IRIs5.
Besides, to distinguish keys from di erent vocabularies, JSON-LD allows de
ning vocabularies via a so-called context. Additionally, a language is assignable
to string values, and JSON-LD allows expressing directed graphs within a single
document.
2.2
          </p>
        </sec>
        <sec id="sec-3-1-2">
          <title>JSON Schema</title>
          <p>
            JSON Schema [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ] for JSON is comparable to XML Schema for XML
documents, it de nes and ensures the structure of JSON data. Speci cations using
5 https://www.w3.org/International/O-URL-and-ident.html
the JSON Schema syntax are themselves JSON documents. The keywords in
JSON schema can be used to de ne constraints on JSON instances or annotate
them with additional information. Assertions on instances can either be true,
the given property value of the JSON instance complies with the de ned
constraint, or false if the property value is not compliant. For a JSON instance to
be valid, it must ful ll all the previously de ned assertions. Besides, annotations
can provide additional information for application usage, e.g., a help text for a
form created based on a JSON schema. Keywords can also be present in both
categories simultaneously, specifying a constraint and providing additional
information. Unknown keywords in a JSON Schema document are ignored and do
not a ect the validity of the validated instance. An empty schema, a schema
without keywords or unknown keywords only, matches every instance. JSON
Schema is still work in progress. Hence, there might be slight changes until the
nal version6. Listing 1 presents a simple JSON Schema de ning the structure
of JSON documents of type Person.
          </p>
          <p>{
}
"title":"Person",
"@id":"http://example.org/Person",
"@type":"Class",
"properties":{
"name":{</p>
          <p>"type":"string"
},
"age":{</p>
          <p>"type":"integer"
}
},
"required":["name", "age"]
Listing 1: A JSON Schema de ning the structure of instances of type person</p>
          <p>This schema de nes two required properties, namely name and age.
Values given for property name must be strings and integers for property age.
Since those properties are marked as required, a given instance must provide
those properties to be valid. The keyword additionalProperties is not used
in this schema. Hence, an instance validated against the given schema can
also have more than the de ned properties and is still valid. When setting
additionalProperties to false, only the two de ned properties are allowed.</p>
          <p>JSON Schema supports linking di erent schemas to reuse parts of a schema
used in many places. A reference to another schema is introduced using the
$ref keyword. The value of this keyword is an identi er of the other schema
that should be included in the speci ed place. When the schema is validated,
6 we rely on the draft 2020-12
json-schema-core.html</p>
          <p>http://json-schema.org/draft/2020-12/
the reference is replaced by the referenced schema. Before evaluating, the content
of the other schema is embedded into the source schema and then applied to the
given instances. Listing 2 presents a schema including a reference to a schema
representing the structure of a DegreeCourse (Listing 3).</p>
          <p>{
"title":"Student",
"@id":"http://example.org/Student",
"type":"object",
"properties":{
"matriculation_number":{</p>
          <p>"type":"integer"
},
"degree_course":{</p>
          <p>"$ref":"definitions.json#/degreeCourse"
}
Listing 2: Student schema referencing the DegreeCourse schema
{
"title":"DegreeCourse",
"@id":"http://example.org/DegreeCourse",
"type":"object",
"properties":{
"name":{</p>
          <p>"type":"string"
},
"course_number":{</p>
          <p>"type":"integer"
}
},
"required":["name"]
}</p>
          <p>Listing 3: Schema representing the structure of DegreeCourses</p>
          <p>For the evaluation the DegreeCourse schema is embedded into the root
schema (see Listing 4).</p>
          <p>Given instances must have the DegreeCourse embedded as well. Only a link
to a DegreeCourse instance would be marked as invalid according to the given
schema.</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Extending JSON Schema to an ontology language</title>
        <p>JSON Schema usually is used for validating JSON data which have to be
structured according to the schema. In our case, we use JSON schema for describing
classes and properties of classes of an ontology. So, in this case, JSON schema is
not used as a constraint language. On the other hand, using JSON schema for
describing ontologies has a nice side e ect, that it can be used in other
applications for validation purposes. Using JSON Schema as ontology language requires
inheritance as an extension and adapting the semantics of relationships. In this
section, we rst introduce inheritance for JSON Schema and then the adapted
semantics of relationships. In the following, we refer to a JSON Schema describing
the structure of a JSON object as class.
3.1</p>
        <sec id="sec-3-2-1">
          <title>Inheritance</title>
          <p>For referring to a superclass relevant for the inheritance, a new keyword is
introduced. In the current JSON Schema draft, keywords have the $ as the pre x.
Our keywords are based on the syntax of JSON-LD with @ as the pre x. The
keyword for representing the relationship between a class and its superclass is
@subClassOf. A class with a @subClassOf property will inherit all the
properties and de nitions from its superclass. The following example (Listing 5) shows
a subclass of Person describing the structure of a Student. It de nes the
superclass Person via the @subClassOf keyword and therefore inherits all the
properties from the superclass. In addition to the inherited properties the Student
{
}
"title":"Student",
"@id":"http://example.org/Student",
"@type":"Class",
"@subClassOf":"http://example.org/Person",
"properties":{
"matriculation_number":{</p>
          <p>"type":"integer"
},
"degree_course":{</p>
          <p>"type":"string"
}
},
"required":["matriculation_number"]</p>
          <p>Listing 5: Subschema
class adds another required property named matriculation number. A JSON
object of type Student must ful ll the requirements from Person and Student
class to be valid.
3.2</p>
        </sec>
        <sec id="sec-3-2-2">
          <title>Relationships</title>
          <p>JSON Schema provides a reference mechanism that looks like a relationship
de nition at rst glance. However, the original reference mechanism expects
the referenced object to be embedded in the JSON instance. This is infeasible
when modeling knowledge graphs. Hence a more exible approach is needed to
describe references between classes. These relationships will be de ned in the
type de nition property. Instead of giving a primitive data type (like integer
or boolean), the reference to another class will be given using the @id property.
During the veri cation, the referenced class will not be embedded into the root
class. However, the referenced object will be validated against the de ned class
by considering the hierarchy. The following example (Listing 6) will illustrate a
relationship de nition.</p>
          <p>In that way, it is possible to refer to an object of a subclass of DegreeCourse.
3.3</p>
        </sec>
        <sec id="sec-3-2-3">
          <title>Semantics</title>
          <p>The semantics of the presented extensions is described by mapping JSON to
Horn-Logic. Mapping means translating the incoming JSON to three types of
predicates. First, the member/2 predicate, describing the type of the given triple.
Second, the subclass/2 predicate and third, the value/3 predicate. For this
mapping the two keywords @id and @type are used. The value of the property
@id is always the unique identi er of each triple, and the according class of the
object is given using the @type property. Listing 7 shows the predicates resulting
from the mapping of the schema of class Person (see Listing 1). In this example,
we skipped the quotes of the predicate values for better readability.
{
"title":"Student",
"@id":"http://example.org/Student",
"@type":"Class",
"properties":{
"matriculation_number":{</p>
          <p>"type":"integer"
},
"degree_course":{</p>
          <p>
            "type":"http://example.org/DegreeCourse"
}
tion with simple ontology means. As soon as we describe more complex
relationships between data, we have to add additional means. We already mapped
JSON objects as well as our extended JSON schema to a logic-based
representation. So it is pretty obvious to add a rule-based language for expressing complex
relationships. Rules are not meant here to be used for constraints but for
deducing additional facts. In [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ] we have presented OO-logic as a rule and ontology
language. We will show in the following that this rule language seamlessly
embeds into our JSON ontology language. OO-logic is a successor of F-logic [
            <xref ref-type="bibr" rid="ref3">3</xref>
            ].
The major goal of developing F-logic was to have a rule language with a syntax
easy to read and understand. Therefore conceptually di erent things are also
represented with a di erent syntax. For instance, membership to a class is
differentiated to a property value. We rst introduce the essential ingredients of
OO-logic in this chapter. Then we show how those rules can easily access JSON
elements.
4.1
          </p>
        </sec>
        <sec id="sec-3-2-4">
          <title>A brief introduction to OO-logic</title>
          <p>OO-logic allows describing the essential parts of an ontology, i.e., classes,
properties of classes with their ranges, hierarchies of classes, and relationship types
between classes. In addition, instances of classes together with their property
names and their relationships can be described in OO-logic easily (see Listing
9).</p>
          <p>// every student is a person
Student :: Person.
// additional properties for students
Student[properties:/matriculation_number,degree_course/].
// DegreeCourse is also a class
degree_course[range:DegreeCourse].
// Sabine is a student
sabine : Student.
// Sabine has the matriculation number 5
sabine[matriculation_number:5].
// physicsA is the uid for the degree course
sabine[degree_course:physicsA].</p>
          <p>Listing 9: Ontology with instances in OO-logic</p>
          <p>Rules derive new facts from existing ones. We can now express that if a
student is studying the course, then all course members can be derived. Afterward,
a query to ask for all courses of Sabine can be executed (see Listing 10).
4.2</p>
        </sec>
        <sec id="sec-3-2-5">
          <title>Accessing JSON by rules</title>
          <p>OO-logic rules allow seamless access to all properties of our JSON objects. They
use the same structure as the JSON objects. That a JSON object is element of
a certain class (type) is expressed by colon ":", that a JSON object is a subclass
CourseMembers: ?C[member:?S] :- ?S:Student, ?S[degree_course:?C]:
?- ?C[member:sabine].</p>
          <p>Listing 10: Query courses of sabine
of another class is expressed by two colons "::", and properties are declared by
expressions in brackets ([..]). Sub-objects are addressed like related objects. A
question mark precedes variables.</p>
          <p>OO-logic provides a vast amount of so-called built-ins. All Java methods from
the Math- and String libraries are available. Values can be compared; complex
mathematical and boolean formulas can be expressed in rule bodies. Rule heads
allow to derive new values for JSON objects' properties, create new JSON objects
with their properties and relations to other JSON objects, and classify JSON
objects.</p>
          <p>// what are the sub-classes of class Person
?Subclass :: Person
// which members has class person, including the members of the sub-classes
?Person : Person
// the matriculation numbers of all students
?Person:Student, ?Person[matriculation_number:?MatriculationNumber]
Listing 11: Examples for conditions usable in rule bodies to access JSON objects</p>
          <p>An example for creating new values for JSON objects and classifying them
using built-ins to access the current time and to compute the age is given in
Listing 12.</p>
          <p>?P:YoungPerson, ?P[age:?Age]
:?P:Person, ?Person[birthDate: ?Born], _now(?Now),
?Age := ?Now-?Born, ?Age &lt; 25.
// compute age of a person by subtracting the birth date from the current time
// classify person as young person if the age is less than 25
Listing 12: Rule accessing JSON objects, classifying them and creating new
property values</p>
          <p>
            Together with the extensions of JSON Schema, those rules are implemented
in a deductive database called SemReasoner (Semantic Reasoner). SemReasoner
is the successor of OntoBroker [
            <xref ref-type="bibr" rid="ref1">1</xref>
            ]. In addition to OntoBroker, SemReasoner
provides a powerful persistency layer and is also a stream reasoner. The syntax
for the logic used by SemReasoner is OO-logic7 [
            <xref ref-type="bibr" rid="ref2">2</xref>
            ]. Dissolving JSON objects
into triples like described before (see 3.3) applies in the same way to JSON
Schema as well. The internal representation of SemReasoner is based on pure
Horn logic with negation. Inside SemReasoner, OO-logic is mapped to Horn logic
with negation. So every Horn logic-based reasoner could be used to implement
the same approach. SemReasoner also provides an inductive logic component
that allows deriving rules from data similar to FOIL [
            <xref ref-type="bibr" rid="ref11">11</xref>
            ].
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>The JSON Schema extensions without the rules8 can easily be implemented by extending an available open-source JSON Schema validator9.</title>
      <p>5</p>
      <sec id="sec-4-1">
        <title>Use case</title>
        <p>At adesso10 we support the e ort of our customers towards better digitalization
processes in our projects. Input management is still an area where much manual
work takes place. Our current use case for applying our technology is a KYC
(know your customer) process in the banking eld. If a corporate customer
requests a new bank account, regulations enforce the bank to gather information
about the customer to estimate the risks. Therefore, the bank will request
information about the customer from risk assessment organizations like Schufa11 or
Credit Reform12 in Germany, and the bank will analyze information delivered
by the customer himself. One piece of information is the balance sheet of the
company. Still, such information is often not delivered in structured form but as
texts either by a PDF or even in paper form. Often, those documents are read,
interpreted, and analyzed by humans, which is much e ort. adesso has
developed a system for analyzing balance sheets for those purposes. Classes describe
di erent types of balance sheets with di erent properties. For instance,
individuals and small businesses have more straightforward balance sheets while larger
businesses have more complex balance sheets. Properties describe the assets and
the nancing. An example for a JSON schema describing an IFRS balance is
given in Listing 13.</p>
        <p>
          Di erent types of rules are used for di erent purposes. The terminology in
such balance sheets is not standardized. In addition, it often contains typos,
especially if OCR has created the balance document (if it has been received
7 For a more detailed description of OO-Logic and the reasoning, we refer to [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], and
in the future, we will publish a paper on SemReasoner.
8 However, JSON as an ontology language can be implemented using any other
reasoner and also other rule languages.
9 https://json-schema.org/implementations.html
10 https://www.adesso.de/de/
11 https://www.meineschufa.de/
12 https://www.creditreform.com
{
}
"title":"IFRSBalance",
"@id":"http://example.org/balance",
"@type":"Class",
"@subClassOf": "Balance",
"properties":{
"non-current assets":{
        </p>
        <p>"type":"float"
},
"current assets":{</p>
        <p>"type":"float"
},
"shareholders equity":{</p>
        <p>"type":"float"
},
"non-current liabilities":{</p>
        <p>"type":"float"
},
"current liabilities":{</p>
        <p>"type":"float"
},
"company":{</p>
        <p>"type":"Company"
}</p>
        <p>}</p>
        <p>Listing 13: A JSON Schema de ning the structure of an IFRS balance
// cell C1 contains the sum of the equity in the document
// cell C1 is in the same row as the word "total shareholders equity"
// the words are compared with similarity measure Levenshtein
?BS["shareholders equity": ?Sum]
:?BS: Balance,
?T:Table,?T[cells:{?C2}], _levenshtein(?C2.value,"total shareholders
,! equity",0.8), ?T[cells:{?C1}],?C1.row=?C2.row, ?C1.column=1.
// if the computed sum of all equity values is different from
// the sum written in the document a warning is given
plausibilityTableBalance("sum for shareholders equity is wrong")
:?BS:Balance, sumEquity(?BS,?S), ?BS["shareholders equity":?E], ?E != ?S.</p>
        <p>Listing 14: Rule to check for a plausibility
as a picture or a sheet of paper). Rules together with string similarity
builtins like Levenshtein are used to map the terms to our properties. Those rules
also take the geometry, e.g., the table structure of the document, into account.
Another type of rule is used for plausibility checks. For instance, a rule sums
up the di erent positions for equities and compares it to the sum mentioned in
the document. An example for a rule performing a plausibility check is given in
Listing 14. Finally, the last type of rules do the analysis itself, i.e., determine
whether the customer is in good nancial shape or the risk with this customer
is high.</p>
        <p>
          At adesso this technology is also used in other applications, e.g., in a chatbot
platform [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
6
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Related work</title>
        <p>When considering the web developer community, most developers are more
familiar with JSON and JSON Schema compared to standards provided by the
W3C (e.g., RDF, RDFS, SHACL). However, a similar approach to JSON Schema
is SHACL.</p>
        <p>A standard of the W3C consortium for de ning the structure of entities
in a knowledge graph based on RDF is the SHApes Constraint Language
(SHACL)13. Similar to JSON Schema, the SHACL de nitions can be used to
generate user interfaces.</p>
        <p>For de ning constraints over a knowledge graph, SHACL di erentiates two
types of shapes, Node shapes and Property shapes. A node shape de nes
constraints for instances, and property shapes de ne constraints for the properties
of those instances. Node shapes together with property shapes are used to de ne
the structure of instances of a speci c type. Listing 15 shows the SHACL shape
for the class Person (see Listing 1).
ex:Person
a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:property [
sh:path ex:name ;
sh:datatype xsd:string ;
] ;
sh:property [
sh:path ex:age ;
sh:datatype xsd:integer ;
] .</p>
        <p>Listing 15: Node shape for the Person schema</p>
        <p>Besides de ning the structure of instances, SHACL allows the usage of
inference rules for inferring new facts. The SHACL documentation presents SPARQL
and Triple rules. Based on the implementation of the underlying reasoning
engine, other rule types can be supported. For example, SHACL JavaScript
Extensions14 de nes another rule type called JavaScript rules.
13 https://www.w3.org/TR/shacl/
14 https://www.w3.org/TR/shacl-js/</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Rule Interchange Format (RIF)15 is a rule language from the Semantic</title>
      <p>Web Community based on Horn rules without function symbols. The semantics
of RIF is standard rst-order semantics. Datalog extensions in RIF are used to
support F-Logic features as objects and frames. RIF is not intended as a rule
language for modeling but is intended as a common format for exchanging rules.</p>
    </sec>
    <sec id="sec-6">
      <title>Rewerse Rule Markup Language (R2ML)16 is a rule language based on</title>
      <p>XML supporting integrity, derivation, production and reaction rules.</p>
    </sec>
    <sec id="sec-7">
      <title>Semantic Web Rule Language (SWRL)17 combines OWL DL or OWL</title>
      <p>Lite with a subset of the Rule Markup Language. The expressivity of SWRL
is equal to OWL DL, which comes at a price of decidability. Also, this makes
practical implementations harder. SWRL rules consist of a body and a head.
Whenever the conditions in the body are ful lled, the condition in the head
must hold as well.</p>
      <p>
        OO-logic supports full Horn logic with negation. Despite using JSON Schema
in contrast to SHACL, our approach is not a constraint language. In OO-logic,
seamlessly embedded built-ins allow for procedural extensions. All Java built-ins
from the Java packages Math and String are integrated systematically. Using a
plugin API built-ins can easily be extended. RIF as an exchange format has
di erent dialects that support negation and a restricted set of built-ins, namely
functions and propositional logic [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], the same holds for SWRL. OO-logic
builtins also support aggregations like sum, average, max, which are not given by the
other rule languages. A mapping between di erent rule languages in the Semantic
Web (excluding OO-logic but including F-logic) is shown in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
7
      </p>
      <sec id="sec-7-1">
        <title>Conclusion and future work</title>
        <p>This paper presented a proposal for a bottom-up enhancement of JSON,
especially JSON Schema, towards a simple ontology language. Therefore, it was
necessary to extend the existing functionality of JSON Schema with inheritance
and relationships. Relationships are a signi cant concept in Linked Data and
therefore also for building knowledge graphs. Besides the extension of JSON
Schema, we presented the mapping from JSON towards triples that can be
stored in a triple store used to reason over them. This extension towards an
ontology language allows describing classes, including properties. Those classes
and properties are then accessible by the rules we introduced for JSON. Those
rules are based on OO-logic, a successor of F-Logic. Both the extension of JSON
Schema and the OO-logic rules are implemented in a deductive database called
SemReasoner. However, the extensions without the rules are easily realizable
by adapting an existing JSON Schema validator implementation. Finally, we
demonstrated a use case using the JSON Schema extensions and OO-logic rules.</p>
        <p>Currently, the described concepts and technology are used in several adesso
projects. JSON is used in many modern software applications. This has
famil15 https://www.w3.org/TR/rif-core/#Overview
16 https://www.w3.org/2005/rules/wg/wiki/R2ML.html
17 https://www.w3.org/Submission/SWRL/
iarity, ease of use, and a short learning period for our software developers as a
consequence. Indeed we achieved a high level of acceptance among our software
developers in those projects. As a side e ect, our JSON schema export is also
used in other applications in forms and adessos form generator for validation
purposes. So we see that JSON, together with related technologies, closes the
gap between semantic technologies and conventional software engineering. From
our projects, we also get valuable feedback for our further work. Currently, we
are working on integrating GraphQL as an additional simple query language and
a cluster version of SemReasoner.</p>
        <p>In future, we plan to publish several papers on SemReasoners reasoning
engine describing the reasoning algorithms used and speci c features that are
relevant for many of our current use cases.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Angele</surname>
          </string-name>
          , J.:
          <source>Ontobroker. Semantic Web</source>
          <volume>5</volume>
          (
          <issue>3</issue>
          ),
          <volume>221</volume>
          {
          <fpage>235</fpage>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Angele</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Angele</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Oo-logic: a successor of f-logic</article-title>
          .
          <source>In: RuleML+ RR (Supplement)</source>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Angele</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kifer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lausen</surname>
          </string-name>
          , G.:
          <article-title>Ontologies in f-logic</article-title>
          .
          <source>In: Handbook on Ontologies</source>
          , pp.
          <volume>45</volume>
          {
          <fpage>70</fpage>
          . Springer (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Angele</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Angele</surname>
          </string-name>
          , J.:
          <article-title>Derool: A rule-based dialog engine</article-title>
          .
          <source>In: RuleML+ RR (Supplement)</source>
          . pp.
          <volume>157</volume>
          {
          <issue>168</issue>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bray</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>The javascript object notation (json) data interchange</article-title>
          format pp.
          <volume>1</volume>
          {
          <issue>16</issue>
          (
          <year>2017</year>
          ). https://doi.org/10.17487/RFC8259, http://www.rfc-editor.
          <source>org/info/ rfc8259</source>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Brickley</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Guha</surname>
            ,
            <given-names>R.V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>McBride</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <source>Rdf schema 1.1. W3C recommendation 25</source>
          ,
          <year>2004</year>
          {
          <year>2014</year>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lassila</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Swick</surname>
            ,
            <given-names>R.R.</given-names>
          </string-name>
          :
          <article-title>Resource description framework (RDF) model and syntax speci cation</article-title>
          .
          <source>World Wide Web Consortium Recommendation (October)</source>
          (
          <year>1999</year>
          ), http://www.w3.org/TR/REC-rdf-syntax
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Ma</surname>
            ,
            <given-names>Z.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          :
          <article-title>Rule interchange in the semantic web</article-title>
          .
          <source>Journal of information science and engineering 28(2)</source>
          ,
          <volume>393</volume>
          {
          <fpage>406</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Pettey</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Why Data and Analytics Are Key to Digital Transformation - Smarter With Gartner</article-title>
          , https://www.gartner.com/smarterwithgartner/ why
          <article-title>-data-and-analytics-are-key-to-digital-transformation/</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pezoa</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vrgoc</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ugarte</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Suarez</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reutter</surname>
            ,
            <given-names>J.L.</given-names>
          </string-name>
          : Foundations of JSON Schema pp.
          <volume>263</volume>
          {
          <issue>273</issue>
          (
          <year>2017</year>
          ). https://doi.org/10.1145/2872427.2883029
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Quinlan</surname>
            ,
            <given-names>J.R.</given-names>
          </string-name>
          :
          <article-title>Learning logical de nitions from relations</article-title>
          .
          <source>Machine learning 5(3)</source>
          ,
          <volume>239</volume>
          {
          <fpage>266</fpage>
          (
          <year>1990</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Rimol</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Why Data and Analytics Are Key to Digital Transformation - Smarter With Gartner</article-title>
          , https://www.gartner.com/smarterwithgartner/ 6
          <article-title>-trends-on-the-gartner-hype-cycle-for-the-digital-workplace-2020/</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Sporny</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Longley</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kellogg</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lanthaler</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Lindstrom, N.:
          <source>Json-ld 1.0. W3C Recommendation</source>
          <volume>16</volume>
          ,
          <issue>41</issue>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Xiao</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rezk</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Rodriguez-Muro</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Calvanese</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Rules and ontology based data access</article-title>
          .
          <source>In: International Conference on Web Reasoning and Rule Systems</source>
          . pp.
          <volume>157</volume>
          {
          <fpage>172</fpage>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>