Fix resource creation from JSON