mirror of
https://github.com/fluencelabs/assemblyscript-json
synced 2025-07-01 23:41:38 +00:00
Add easy serialization to String
This commit is contained in:
@ -16,6 +16,10 @@ export class JSONEncoder {
|
||||
return buffer.subarray(0, buffer.length - 1);
|
||||
}
|
||||
|
||||
toString(): String {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
setString(name: string, value: string): void {
|
||||
this.writeKey(name);
|
||||
this.writeString(value);
|
||||
|
Reference in New Issue
Block a user