minus-square4wd@programming.devtoProgramming@programming.dev•What is the best way to store data for exceptional cases among nested objects in arrays in JSON?linkfedilinkarrow-up2arrow-down1·7 months agoWhat about using enums? In this case you will have to specify them for all records, but this ensures that the field will always be present. enum license_owner { regular_citizen = 0, embassy, government, ... } linkfedilink
minus-square4wd@programming.devtoProgramming@programming.dev•Preview builds for the Zed editor now available on Linuxlinkfedilinkarrow-up1·8 months agoDon’t forget https://zed.dev/docs/telemetry linkfedilink
What about using enums? In this case you will have to specify them for all records, but this ensures that the field will always be present.
enum license_owner { regular_citizen = 0, embassy, government, ... }