I'm looking for a term for simple objects that emphasizes their simplicity. Specifically, objects that are free of self-reference, and contain no methods, bindings, etc (i.e. JSON-serializable).
Right now I use words like:
I don't like them because:
var good_1 = {};
var good_2 = {a: 1, b: 'str'}
var good_3 = {thing: [1,
{a: 1,
b: 'str'},
'word'],
otherThing: 42};
var bad_1 = {thing: 3,
getThing: function () { return this.thing; }};
var bad_2 = {a: 1};
bad_2['self'] = bad_2;
What should I call objects that are free of self-reference, and contain no methods, bindings, etc (i.e. JSON-serializable)?
Plain Old Data Structure.
PODS, for short. They're a data structure comprised of only data fields, no behaviour. The term is language-agnostic.
Context: they're often mentioned in the same breath as POJOs (Plain Old Java Objects), which vary a bit in definition. This wikipedia page says they're essentially PODS with getters and setters. Some googling will turn up disagreement, though.