MCPcopy Create free account
hub / github.com/chronoxor/FastBinaryEncoding / toJSON

Method toJSON

projects/JavaScript/proto/test.js:12705–12711  ·  view source on GitHub ↗

* Convert struct to JSON * @this {!StructBytes} * @returns {!object} Struct value for JSON

()

Source from the content-addressed store, hash-verified

12703 * @returns {!object} Struct value for JSON
12704 */
12705 toJSON () {
12706 return {
12707 f1: ((this.f1 != null) ? Buffer.from(this.f1).toString('base64') : null),
12708 f2: ((this.f2 != null) ? Buffer.from(this.f2).toString('base64') : null),
12709 f3: ((this.f3 != null) ? Buffer.from(this.f3).toString('base64') : null)
12710 }
12711 }
12712
12713 /**
12714 * Convert JSON to struct

Callers

nothing calls this directly

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected