- fun json: JsonObject do
- var obj = new JsonObject
- obj["name"] = name
- obj["desc"] = desc
- obj["empty"] = values.is_empty
- if values.not_empty then obj["avg"] = avg
- if values.not_empty then obj["std_dev"] = std_dev
- if values.not_empty then obj["threshold"] = threshold
- return obj
+ redef fun core_serialize_to(v) do
+ v.serialize_attribute("name", name)
+ v.serialize_attribute("desc", desc)
+ v.serialize_attribute("empty", values.is_empty)
+ if values.not_empty then v.serialize_attribute("avg", avg)
+ if values.not_empty then v.serialize_attribute("std_dev", std_dev)
+ if values.not_empty then v.serialize_attribute("threshold", threshold)