Fix JSON serialization in resources