W3cubDocs

/Pony

JsonArray

[Source]

class ref JsonArray

Constructors

create

[Source]

Create an array with zero elements, but space for len elements.

new ref create(
  len: USize val = 0)
: JsonArray ref^

Parameters

Returns

from_array

[Source]

Create a Json array from an actual array.

new ref from_array(
  data': Array[(F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref)] ref)
: JsonArray ref^

Parameters

Returns

Public fields

var data: Array[(F64 val | I64 val | Bool val | None val | String val | JsonArray ref | JsonObject ref)] ref

[Source]

The actual array containing JSON structures.

Public Functions

string

[Source]

Generate string representation of this array.

fun box string(
  indent: String val = "",
  pretty_print: Bool val = false)
: String val

Parameters

  • indent: String val = ""
  • pretty_print: Bool val = false

Returns

Private Functions

_show

[Source]

Append the string representation of this array to the provided String.

fun box _show(
  buf': String iso,
  indent: String val = "",
  level: USize val,
  pretty: Bool val)
: String iso^

Parameters

Returns

© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/json-JsonArray