Refactoring of JSON serialisers