Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use arrays for notes #5

Open
Tomczik76 opened this issue Sep 21, 2015 · 3 comments
Open

Use arrays for notes #5

Tomczik76 opened this issue Sep 21, 2015 · 3 comments

Comments

@Tomczik76
Copy link

If a single note in a measure it uses and object.

{"score-partwise":{
"$":{
"version":"3.0"
},
"part-list":{
"score-part":{
"$":{
"id":"P1"
},
"part-name":"Music"
}
},
"part":{
"$":{
"id":"P1"
},
"measure":{
"$":{
"number":"1"
},
"attributes":{
"divisions":"1",
"key":{
"fifths":"0"
},
"time":{
"beats":"4",
"beat-type":"4"
},
"clef":{
"sign":"G",
"line":"2"
}
},
"note":{
"pitch":{
"step":"C",
"octave":"4"
},
"duration":"4",
"type":"whole"
}
}
}
}
}

@saebekassebil
Copy link
Owner

I'm not sure I understand what the issue is?

@bwbohl
Copy link

bwbohl commented Sep 25, 2015

Some JSON serializers only generate JSON array notation if multiple objects are to be contained, whereas they output object notation if only a single object is handled. This leads to inconsistent data structures that require more logic on the processing than necessary. If a consistent notation in arrays is the only allowed option both these problems are solved.
E.G.
measures: [{note1}] vs measures: [{notes: [{note1}]}]


Hochschule für Musik Detmold
Zentrum für Musik - Edition - Medien
Benjamin W. Bohl
Hornsche-str. 44
D-32756 Detmold

Tel. +49 5231 975-874

---- Jakob Miland schrieb ----

I'm not sure I understand what the issue is?


Reply to this email directly or view it on GitHub.

@saebekassebil
Copy link
Owner

Yes. Let's be consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants