I wanted to make my own json binary thing, so I looked at NBT, BSON and CBOR to see what they were up to. It's simple like NBT but I wanted to see what other stuff I could add.
There's also a string format (SBSO).
java -cp <libjar> io.github.kalmemarq.bso.BsoUtils b2s <inpath> <outpath> [--indent <int>]
java -cp <libjar> io.github.kalmemarq.bso.BsoUtils s2b <inpath> <outpath> [--le]
- BsoByte / BsoUByte
- (un)signed 8-bit integer
- BsoBool
- boolean
- BsoShort / BsoUShort
- (un)signed 16-bit integer
- BsoInt / BsoUInt
- (un)signed 32-bit integer
- BsoLong / BsoULong
- (un)signed 64-bit integer
- BsoFloat
- 32-bit float
- BsoDouble
- 64-bit float
- BsoString
- UTF-8 string
- BsoMap
- map
- BsoList
- list
- BsoByteArray / BsoUByteArray
- (un)signed 8-bit integer array
- BsoShortArray / BsoUShortArray
- (un)signed 16-bit integer array
- BsoIntArray / BsoUIntArray
- (un)signed 32-bit integer array
- BsoLongArray / BsoULongArray
- (un)signed 64-bit integer array
- BsoFloatArray
- 32-bit float array
- BsoDoubleArray
- 64-bit float array
- BsoByte
- 0sb / 0b0sb / 0x0sb
- BsoUByte
- 0ub / 0b0ub / 0x0ub
- BsoBool
- true or false
- BsoShort
- 0ss / 0b0ss / 0x0ss
- BsoUShort
- 0us / 0b0us / 0x0us
- BsoInt
- 0 / 0b0 / 0x0
- BsoUInt
- 0u / 0b0u / 0x0u
- BsoLong
- 0sl / 0b0sl / 0x0sl
- BsoULong
- 0ul / 0b0ul / 0x0ul
- BsoFloat
- 0.0f
- BsoDouble
- 0.0 / 0.0d
- BsoString
- single line
- "text"
- multiline
- """text"""
- single line
- BsoMap
- { key: value , }
- { "key": value , }
- BsoList
- [value , ]
- BsoByteArray
- [B; value , ]
- BsoUByteArray
- [UB; value , ]
- BsoShortArray
- [S; value , ]
- BsoUShortArray
- [US; value , ]
- BsoIntArray
- [I; value , ]
- BsoUIntArray
- [UI; value , ]
- BsoLongArray
- [L; value , ]
- BsoULongArray
- [UL; value , ]
- BsoFloatArray
- [F; value , ]
- BsoUFloatArray
- [UF; value , ]
- BsoDoubleArray
- [D; value , ]
- BsoUDoubleArray
- [UD; value , ]
BsoCustom<T>
- BsoCustomType<T>
(<name>; value)