-
Notifications
You must be signed in to change notification settings - Fork 34
Items
Jakob Voss edited this page Sep 26, 2014
·
4 revisions
An item is the basic unit of data processing in Catmandu. Items are data structures build of key-value-pairs (aka objects), lists (aka arrays), strings, numbers, and null-values. All items can be expressed in JSON and YAML, among other formats. The following item consists of one object with two keys.
Serialized in JSON:
{
"author": "Goldman, Emma",
"title": "Living My Life"
}
Serialized in YAML:
---
author: Goldman, Emma
title: Living My Life
Items are usually processed in sequences. For instance the JSON importer by default expects one JSON object on each line of input:
{ "author": "Gabriel, Mary", "title": "Notorious Victoria" }
{ "author": "Goldman, Emma", "title": "Living My Life" }
See Importers and Exporters for details how to read and write items sequentially (for instance in files) and Stores about methods for storing and random access (for instance in databases).