update documentation
This commit is contained in:
parent
ee5afcdafe
commit
3644533043
@ -64,17 +64,12 @@ private fun Meta.toJsonWithIndex(descriptor: MetaDescriptor?, index: String?): J
|
|||||||
JsonObject(pairs.toMap())
|
JsonObject(pairs.toMap())
|
||||||
}
|
}
|
||||||
|
|
||||||
public fun Meta.toJson(descriptor: MetaDescriptor? = null): JsonElement {
|
/**
|
||||||
return toJsonWithIndex(descriptor, null)
|
* Convert Meta to [JsonElement]. Meta with children is converted to [JsonObject].
|
||||||
// val element = toJsonWithIndex(descriptor, null)
|
* Meta without children is converted to either [JsonPrimitive] or [JsonArray] depending on the value type.
|
||||||
// return if (element is JsonObject) {
|
* An empty Meta is converted to an empty JsonObject.
|
||||||
// element
|
*/
|
||||||
// } else {
|
public fun Meta.toJson(descriptor: MetaDescriptor? = null): JsonElement = toJsonWithIndex(descriptor, null)
|
||||||
// buildJsonObject {
|
|
||||||
// put("@value", element)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert a Json primitive to a [Value]
|
* Convert a Json primitive to a [Value]
|
||||||
|
Loading…
Reference in New Issue
Block a user