json2object has an annotation @:jcustomwrite which allows for custom serialization of values to be written to JSON.

Functions must be of the signature (T) -> String, where T is the type of the property.

NOTE: Result must include quotation marks if the value is a string! json2object will not add them for you!

Static methods

staticdynamicValue(value:Dynamic):String

@:jcustomwrite(funkin.data.DataWrite.dynamicValue)

Parameters:

value

Returns:

String

staticeitherFloatOrFloats(value:Null<Either<Float, Array<Float>>>):String

staticsemverVersion(value:Version):String

staticsemverVersionRule(value:VersionRule):String