JSONStringify returns the JSON string representation of the value.
()
| 149 | |
| 150 | // JSONStringify returns the JSON string representation of the value. |
| 151 | func (v *Value) JSONStringify() string { |
| 152 | ref := C.JS_JSONStringify(v.ctx.ref, v.ref, C.JS_NewNull(), C.JS_NewNull()) |
| 153 | ptr := C.JS_ToCString(v.ctx.ref, ref) |
| 154 | defer C.JS_FreeCString(v.ctx.ref, ptr) |
| 155 | return C.GoString(ptr) |
| 156 | } |
| 157 | |
| 158 | func (v *Value) ToByteArray(size uint) ([]byte, error) { |
| 159 | if v.ByteLen() < int64(size) { |
no outgoing calls