Add activemodel serialization for json representation of nodes and fields.