alphaTab.model.JsonConverter
This class can convert a full Score instance to a simple JavaScript object and back for further
JSON serialization.
class JsonConverterMethods​
jsObjectToMidiEvent​
Converts the given JavaScript object into a MidiEvent object.
| Parameter | Summary |
|---|---|
midiEventAll | (no description) |
Returns​
The converted MidiEvent.
jsObjectToMidiFile​
Converts the given JavaScript object into a MidiFile object.
| Parameter | Summary |
|---|---|
jsObjectAll | The javascript object to deserialize. |
Returns​
The converted MidiFile.
jsObjectToScore​
Converts the given JavaScript object into a score object.
| Parameter | Summary |
|---|---|
jsObjectAll | The javascript object created via |
settingsAll | The settings to use during conversion. |
Returns​
The converted score object.
jsObjectToSettings​
Converts the given JavaScript object into a settings object.
| Parameter | Summary |
|---|---|
jsObjectAll | The javascript object created via |
Returns​
The converted Settings object.
jsonToScore​
Converts the given JSON string back to a Score object.
| Parameter | Summary |
|---|---|
jsonAll | The JSON string |
settingsAll | The settings to use during conversion. |
Returns​
The converted score object.
jsonToSettings​
Converts the given JSON string back to a Score object.
static jsonToSettings(json: string): Settings| Parameter | Summary |
|---|---|
jsonAll | The JSON string |
Returns​
The converted settings object.
midiEventToJsObject​
Converts the given MidiEvent object into a serialized JavaScript object.
| Parameter | Summary |
|---|---|
midiEventAll | (no description) |
Returns​
A serialized MidiEvent object without ciruclar dependencies that can be used for further serializations.
midiFileToJsObject​
Converts the given MidiFile object into a serialized JavaScript object.
| Parameter | Summary |
|---|---|
midiAll | The midi file to convert. |
Returns​
A serialized MidiFile object without ciruclar dependencies that can be used for further serializations.
scoreToJsObject​
Converts the score into a JavaScript object without circular dependencies.
| Parameter | Summary |
|---|---|
scoreAll | The score object to serialize |
Returns​
A serialized score object without ciruclar dependencies that can be used for further serializations.
scoreToJson​
Converts the given score into a JSON encoded string.
static scoreToJson(score: Score): string| Parameter | Summary |
|---|---|
scoreAll | The score to serialize. |
Returns​
A JSON encoded string.
settingsToJsObject​
Converts the settings object into a JavaScript object for transmission between components or saving purposes.
| Parameter | Summary |
|---|---|
settingsAll | The settings object to serialize |
Returns​
A serialized settings object without ciruclar dependencies that can be used for further serializations.
settingsToJson​
Converts the given settings into a JSON encoded string.
static settingsToJson(settings: Settings): string| Parameter | Summary |
|---|---|
settingsAll | The settings to serialize. |
Returns​
A JSON encoded string.