What naming conventions are people using for variables that hold JSON-serializable objects? We'd like the name of the variable to remind us to only store information in the object that can be serialized into JSON without losing information. Applications include HTTP sessions, non-searchable database columns, data logging, and serializing restorable application state.
The obvious contenders, at least from the perspective of someone programming in Javascript for node.js, seem to fall short:
prefixJSON
- JSON is actually a serialization syntax, so this would properly be a string in JSON format, not an objectprefixInfo
-info
is often used in node.js for any kind of map, including ones that take functions and instances of ES6 classes.prefixMap
- Same issue as theinfo
suffixprefixData
- Doesn't really suggest a constraint on the type
The best I can do is prefixJSONInfo
, prefixJSONData
, or prefixJSONObject
, but I was hoping for something more succinct and readable. The prefix may be lengthy and descriptive too.
This question mainly applies to programming languages that support variant-type variables, such as Javascript. These variables are meant to hold a mishmash, but the programmer needs to be reminded to limit the types of values that are thrown into the mishmash.