Skip to content

JSON

Parameters

Required parameters are in red and Optional parameters are in blue.


  • directory, the folder location to write JSON files to

  • encoding, whether or not to accept double-byte characters, like japanese or cryillic
    default: None ( allowed: UTF-8 )

  • indentation, the number of spaces to indent when writing to a file, used for pretty-printing data
    default: None ( the json structure will be flat )
How do I use the Syncer in commands?

CS Tools accepts syncer definitions in either declarative or configuration file form.

Find the copy button to the right of the code block.

Simply write the parameters out alongside the command.

cs_tools tools searchable metadata --syncer "json://directory=." --config dogfood

* when declaring multiple parameters inline, you should wrap the enter value in quotes.

  1. Create a file with the .toml extension.

    syncer-overwrite.toml

    [configuration]
    directory = "."
    encoding = "UTF-8"
    indentation = 2
    
    * this is a complete example, not all parameters are required.

  2. Write the filename in your command in place of the parameters.

    cs_tools tools searchable metadata --syncer json://syncer-overwrite.toml --config dogfood