To me it seems unnecessary to have atoms as a key in the json structure when this is a detailed view a specific atom. Will it work with:

```
return {marshal(atom, atom_fields)}
```
?