Implement jsonSerializable for ObjectGroup class

This also means I don't need to deal with the container array
in the javascript.