# convert – Axolotl

# convert

`convert`

Module containing File Reader, File Writer, Json Parser, and Jsonl Serializer classes

## Classes

Name | Description
--- | ---
FileReader | Reads a file and returns its contents as a string
FileWriter | Writes a string to a file
JsonParser | Parses a string as JSON and returns the result
JsonToJsonlConverter | Converts a JSON file to JSONL
JsonlSerializer | Serializes a list of JSON objects into a JSONL string
StdoutWriter | Writes a string to stdout

### FileReader

    convert.FileReader()

Reads a file and returns its contents as a string

### FileWriter

    convert.FileWriter(file_path)

Writes a string to a file

### JsonParser

    convert.JsonParser()

Parses a string as JSON and returns the result

### JsonToJsonlConverter

    convert.JsonToJsonlConverter(
        file_reader,
        file_writer,
        json_parser,
        jsonl_serializer,
    )

Converts a JSON file to JSONL

### JsonlSerializer

    convert.JsonlSerializer()

Serializes a list of JSON objects into a JSONL string

### StdoutWriter

    convert.StdoutWriter()

Writes a string to stdout