lostcarpark / conclar

ConClár Programme Guide in ReactJS
MIT License
11 stars 12 forks source link

Allow object root for program.json and people.json #152

Open aJanuary opened 4 months ago

aJanuary commented 4 months ago

In order to be able to add metadata about the files, such as version and publish date, in a JSON compatible format the root needs to be an object instead of an array.

This patch keeps compatibility with the old array root by testing if the root is an array or not.

lostcarpark commented 3 months ago

Thanks for your work on this, Andrew.

I've been planning something similar, particularly as to properly meet the JSON standard, the top level needs to be an object.

However, I would like to keep the option of putting both schedule and people in the same file.

I think calling the array "items" is also not as clear as it could be. I would prefer it to be more explicit about what the items are.

Would it be okay with you to change the items property to schedule and people?

It would still allow two separate files, but if the generating application wanted to put both properties in the same object, ConClár could support it.

I like the info object, but the version property is a little unclear to me. Is it...

I think there would be potential for including any or all of the above, but I would like us to be clear about what any version(s) mean.

I think another thing that would be helpful to include in the info is the name of the generating application.