Abstract Operations
A true gem for everyone working with data serialization in Minecraft! This library mod provides an easy and fully data-preserving way to convert between JSON and NBT formats.
Core Features
The main functionality includes GenericX classes for each NBT type. For example, GenericCompound extends HashMap, while GenericList inherits from ArrayList. Each such class contains useful json(), nbt(), and map(func) methods for both format conversion and structural mapping of data trees.
Conversion Capabilities
The mod offers a DynamicOps instance called GenericOps, specifically designed for easy data conversion from JSON and NBT to a universal format. When the patchjson flag is enabled, precise number sizes can be specified in JSON using strings like "10b" similar to SNBT tags. Additionally, number lists are automatically transformed into numeric arrays. The patchnbt function ensures proper conversion of byte values 0-1 into boolean variables.
Compatibility
Starting from version 1.1.0, the library provides full support for Wispforest's Endec. This opens additional possibilities for working with modern encoding and decoding systems in mods.