jamulussoftware / jamulus

Jamulus enables musicians to perform real-time jam sessions over the internet.
https://jamulus.io
Other
979 stars 220 forks source link

JSON-RPC: Review {instrument,country,...}Id usage #2468

Open hoffie opened 2 years ago

hoffie commented 2 years ago

Some APIs work with serialized data (skill level, directory server status), some other APIs return or expect internal ids such as instrumentId or countryId.

Has this feature been discussed and generally agreed?

No.

Describe the solution you'd like

We should define how this is supposed to be.

  1. Do we try to be user-friendly and serialize everything to a proper string so that the API and the implementation are rather disentangled?
  2. Do we keep implementation overhead low and expose internal ids via the API?
  3. Do we decide on a case-by-case basis?

As an API-person, I tend towards (1). It's also becoming obvious that making implementation details such as the countryId being a Qt5 QLocale::Country has downsides.

Describe alternatives that have been considered

See above.

ann0see commented 2 years ago

As an API-person, I tend towards (1)

Yes I'd also favor that since we might have places where Qt might change things in future.

ann0see commented 2 years ago

@Rob-NY @dtinth any updates here?