public string ToJSON() { JSONBuilder jb = new JSONBuilder(); if (vals.Length == 1) { jb.addPrimitive(name, vals[0]); } else { jb.addPrimitiveArray(name, vals); } return(jb.ToString()); }
public void addToJSON(JSONBuilder jb) { jb.addPrimitiveArray(typeof(T).Name, arr); jb.closeMe(); }