Skip to content
This repository was archived by the owner on Sep 5, 2019. It is now read-only.

BrokenEarthDev/FusionYAML

Repository files navigation

Notice

FusionYAML has been moved to https://github.com/FusionYAML. This repository will no longer receive updates

FusionYAML

What is FusionYAML?

FusionYAML, formally known as SimpleYAML, is a library that eases retrieving, creating, removing, and modifying data. FusionYAML contains GSON-style classes and method for retrieving, creating, removing, and modifying data. FusionYAML was decided to be recreated from scratch to support flexibility.

Why use FusionYAML

Our priority is simplicity and convenience.

Core Features

  • Converting YAML to JSON and vice versa
  • Contains GSON-style methods and classes for updating and retrieving data
  • Configurations

Examples

  • YamlElements
YamlObject object = new YamlObject();
object.set("key", true);
YamlNode node = new YamlNode();
node.addChild("age", 63);
node.addChild("height", "1.77m");
object.set("Bill Gates", node);
System.out.println("YAML STRING");
System.out.println(object.toString());
System.out.println("JSON STRING");
System.out.println(object.toJsonString());

The above will print:

YAML STRING
key: true
Bill Gates:
  age: 63
  height: 1.77m

JSON STRING
{"key":true,"Bill Gates":{"age":63,"height":"1.77m"}}
  • Configurations

FileConfiguration

File file = new File("path to file");
FileConfiguration configuration = new FileConfiguration(file);
configuration.set("dx", 321);
configuration.save(file);
File Data
dx: 321

WebConfiguration

WebConfiguration configuration = new WebConfiguration("url here");
configuration.set("x", 312);
configuration.save(new File("path to file"));
File Data
x: 312
  • Serialization and Deserialization
Test test = new Test(2, 4, 6);
ObjectSerializer serializer = new ObjectSerializer();
Object serialized = serializer.serialize(test);

ObjectDeserializer deserializer = new ObjectDeserializer();
Test deserializedTest = deserializer.deserialize((Map) serialized, Test.class);

Creating a Pull Request

There are a few requirements that you'll have to follow to get your request considered.
  • Using standard java conventions
  • Adhering to java's good practices
  • Well documented code
In your pull request, make sure to explain why should the code be deemed useful in full detail.

Become a Collaborator

Contact me via discord if you meet one of these requirements:
  • Atleast one pull request accepted from the user
  • demonstrate appropriate java skills
  • if you're reflxction

Planned Features

  • Support serialization and deserialization
  • Adding events
  • Asynchronous web configuration
  • Changing data directly on the webpage using FTP
  • String Literals in YAML
  • Supporting basic math operations in YAML

About

A robust library for managing YAML objects

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages