Improve JSON serialization for MockResources