Work on JSON serialization, add a test; changes for SettableIdentifier too