Code

store: Split out common JSON code into a separate helper function.