GD-CBOR
A

Publisher

arlez80

GD-CBOR

Tools
CBOR Serialization Encoding Decoding GDScript Data Binary Format

encode/decode implementation of Concise Binary Object Representation for Godot Engine 4.x / GDScript.

GD-CBOR

This is encode/decode implementation of Concise Binary Object Representation for GDScript.

ko-fi

How to Use

Parse

You can use this like a JSON.parse in GDScript.

func _ready( ):
	var cbor: = GDCbor.new( )
	if cbor.parse( FileAccess.get_file_as_bytes( "path/to/data.cbor" ) ) != OK:
		print( cbor.error )

	print( cbor.data )

Binarify

You can use this like a JSON.stringify in GDScript.

func _ready( ):
	var cbor: = GDCbor.new( )
	print( cbor.binarify( [1, -2, 3, 3.1415926535, "aaa", {"test": "value"}, null, true, false] ) )

License

MIT License

Author

あるる / きのもと 結衣 @arlez80