Package-level declarations
Types
Thrown by a Deobjectifier when a plain object (e.g. a Map, List, or scalar value obtained by parsing some textual format) does not have the shape expected for the target type — for instance, a map with none of the recognized keys (var, fun/args, list, block, tuple, integer, real, head/body, set) when deobjectifying a it.unibo.tuprolog.core.Term, or a malformed nested value (e.g. a struct whose args is not a list).
Converts plain, format-agnostic objects (e.g. maps, lists, strings, numbers, booleans) — as produced by parsing some concrete textual format (JSON, YAML, XML, ...) into a generic object tree — back into values of type T.
Converts a textual representation in a given mimeType (e.g. JSON, YAML, XML) back into values of type T. This is the counterpart of Serializer, used e.g. to load a value that was previously persisted to disk or received over a network.
A textual data format that a Serializer can produce and a Deserializer can consume, identified by its type and subType, e.g. application/json.
Converts values of type T into plain, format-agnostic objects (e.g. maps, lists, strings, numbers, booleans) that a generic data-binding library (such as Jackson on the JVM) can then turn into JSON, YAML, XML, or any other concrete textual representation.
Platform-specific helpers for working with the plain object trees produced/consumed by Objectifier/Deobjectifier implementations (e.g. Map/List structures on the JVM, or dynamic objects on Kotlin/JS). Mainly intended for testing serializers/deserializers without depending on a specific textual rendering (e.g. key order) of a given format.
Platform-specific helpers for working with the plain object trees produced/consumed by Objectifier/Deobjectifier implementations (e.g. Map/List structures on the JVM, or dynamic objects on Kotlin/JS). Mainly intended for testing serializers/deserializers without depending on a specific textual rendering (e.g. key order) of a given format.
Platform-specific helpers for working with the plain object trees produced/consumed by Objectifier/Deobjectifier implementations (e.g. Map/List structures on the JVM, or dynamic objects on Kotlin/JS). Mainly intended for testing serializers/deserializers without depending on a specific textual rendering (e.g. key order) of a given format.
A JVM-only Deserializer that can also read directly from a Reader (e.g. a file or network stream), avoiding the need to first buffer the whole input into a String. The String-based deserialize/deserializeMany methods of Deserializer are implemented in terms of the Reader-based ones, by wrapping the string in a StringReader.
A JVM-only TermDeserializer that can also read a Term directly from a java.io.Reader, e.g. to load a term from a file or network stream without buffering it into a String first.
Signals that a Term could not be serialized, e.g. because the target format cannot represent it.
A Deobjectifier of Terms: rebuilds a Term from a plain object tree following the same shape produced by TermObjectifier (see its documentation for the mapping scheme). Used e.g. by a TermDeserializer after parsing a JSON/YAML/XML document into such a plain tree.
A Deserializer of Terms, e.g. to reload a previously persisted fact or query solution from disk, or to receive one sent by another process (or tool) as JSON, YAML, or XML. Internally, a TermDeserializer typically parses the input in the requested MimeType into a plain object and then reconstructs the Term from it via TermDeobjectifier.
An Objectifier of Terms, implemented as a TermVisitor so that every Term sub-type is converted into a plain object following a fixed, format-agnostic scheme. This scheme is what lets a TermSerializer render any Term as JSON, YAML, or XML.
A Serializer of Terms, e.g. to persist a knowledge base fact or a query solution to disk, or to send it to another process (or another tool, possibly written in another language) as JSON, YAML, or XML. Internally, a TermSerializer typically converts the Term into a plain object via TermObjectifier and then writes that object in the requested MimeType.
A JVM-only Serializer that can also write directly to a Writer (e.g. a file or network stream), avoiding the need to first build the whole output as a String in memory. The String-returning serialize/serializeMany methods of Serializer are implemented in terms of the Writer-based ones, by writing into a StringWriter.
A JVM-only TermSerializer that can also write a Term directly to a java.io.Writer, e.g. to persist a term to a file or network stream without building the whole String in memory first.
Properties
The shared Jackson ObjectMapper used, on the JVM, to read/write plain object trees in this MimeType: a plain ObjectMapper for MimeType.Json, a YAMLMapper for MimeType.Yaml, and an XmlMapper for MimeType.Xml. One mapper instance is reused for each MimeType.
Functions
Creates the platform-default TermDeobjectifier. Backs TermDeobjectifier.default.
Creates the platform-default TermDeobjectifier. Backs TermDeobjectifier.default.
Creates the platform-default TermDeobjectifier. Backs TermDeobjectifier.default.
Creates the platform-default TermDeserializer for mimeType. Backs TermDeserializer.of.
Creates the platform-default TermDeserializer for mimeType. Backs TermDeserializer.of.
Creates the platform-default TermDeserializer for mimeType. Backs TermDeserializer.of.
Creates the platform-default TermObjectifier. Backs TermObjectifier.default.
Creates the platform-default TermObjectifier. Backs TermObjectifier.default.
Creates the platform-default TermObjectifier. Backs TermObjectifier.default.
Creates the platform-default TermSerializer for mimeType. Backs TermSerializer.of.
Creates the platform-default TermSerializer for mimeType. Backs TermSerializer.of.
Creates the platform-default TermSerializer for mimeType. Backs TermSerializer.of.