ThereThis leads to a creep of this tuple for every value. Take a fully-fleshed out value from the characters
array:
{
name : {
value : "Hakan",
confidence: 0.80
}
ultra : {
value: 1,
confidence: 0.90
}
}
As the structures that represent the values become more and more detailed (and more analysis is something aboutdone on them to try and determine the JSON being structured this wayconfidence behind that has a smell/feels very unwieldyanalysis), perhaps due to the naturenesting of JSON.the tuples adds great deal of noise to the overall structure, considering that the final result (when verified) will be:
{
name : "Hakan",
ultra : 1
}
(And recall that this is just a nested value)
While the same as the JSON representation, it doesn't have the same smellcreep because I don't have to meredefine the tuple every time and the code retains a sort of elegance.
Is there a more formalized/cleaner/best practice way of representing these typecontaining the creep of these tuples (really scalars with a second value attached to it all the time) in JSON, or is the approach above an accepted approach for the type of data I'm trying to store (and I'm just perceiving it the wrong way)?