ChromaSave

This library let's you make save data using JSON!!
https://github.com/Brainy0789/ChromaSave/

To install, run:

haxelib install ChromaSave 1.1.2 

See using Haxelib in Haxelib documentation for more information.

README.md

ChromaSave

ChromaSave is a simple way to store save data using .JSON!

Installation

` bash haxelib install chromasave



## Usage

``` haxe
import save.ChromaSave;
import save.ChromaConvert;

class Main
{
    static function main()
    {
        // Create a new ChromaSave instance for the 'save' file
        var chromaSave = new ChromaSave("save");

        // Parse existing JSON from disk (if it exists)
        chromaSave.parse();

        // Add or update a field in the save data
        chromaSave.set("field", true);

        // Access the value
        Sys.println(chromaSave.get("field")); // outputs 'true'

        // Write the current data to disk
        chromaSave.save();

        // --- Migrating from FlxSave ---
        // Convert FlxG.save to a ChromaSave instance
        chromaSave = ChromaConvert.fromFlxG("save");

        //You can also use any FlxSave instance with this
        chromaSave = ChromaConvert.convertFlxSave(FlxG.save);
    }
}
Contributors
Brainy7890
Version
1.1.2
Published
3 months ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub