Converts ByteSize object to JSON object
Source
Map<String, Object> toJson() { Map<String, Object> entityMap = {}; entityMap[_BitSymbol] = Bits.toString(); entityMap[_ByteSymbol] = Bytes.toStringAsFixed(20); entityMap[_KiloByteSymbol] = KiloBytes.toStringAsFixed(20); entityMap[_MegaByteSymbol] = MegaBytes.toStringAsFixed(20); entityMap[_GigaByteSymbol] = GigaBytes.toStringAsFixed(20); entityMap[_TeraByteSymbol] = TeraBytes.toStringAsFixed(20); entityMap[_PetaByteSymbol] = PetaBytes.toStringAsFixed(20); return entityMap; }