---
title: "Companion"
sidebar_label: "Companion"
description: "Kotlin binding reference: Companion."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../../index.md)/[io.clika.runtime](../../index.md)/[Json](../index.md)/[Companion](index.md)

# Companion

[common]\
object [Companion](index.md)

## Functions

| Name | Summary |
|---|---|
| [newArray](newArray.md) | [common]<br>fun [newArray](newArray.md)(): [Json](../index.md)<br>An empty array, ready for [add](../add.md). |
| [newObject](newObject.md) | [common]<br>fun [newObject](newObject.md)(): [Json](../index.md)<br>An empty object, ready for [set](../set.md). |
| [of](of.md) | [common]<br>fun [of](of.md)(value: [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)): [Json](../index.md)<br>A boolean value.<br>[common]<br>fun [of](of.md)(value: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)): [Json](../index.md)<br>A floating-point value.<br>[common]<br>fun [of](of.md)(value: [Long](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)): [Json](../index.md)<br>An integer value.<br>[common]<br>fun [of](of.md)(value: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [Json](../index.md)<br>A string value. |
| [ofNull](ofNull.md) | [common]<br>fun [ofNull](ofNull.md)(): [Json](../index.md)<br>The null value. |
| [parse](parse.md) | [common]<br>fun [parse](parse.md)(text: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [Json](../index.md)<br>Parse JSON text; malformed text fails with `INVALID_ARGUMENT`. |
| [readFile](readFile.md) | [common]<br>fun [readFile](readFile.md)(path: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)): [Json](../index.md)<br>Read and parse a JSON file. |