Skip to content

Conversation

@philippthun
Copy link
Member

@philippthun philippthun commented Jan 26, 2026

  • Use Oj consistently for encoding and decoding.
  • Remove custom encoder in JSON initializer.
  • Configure Oj to encode BigDecimals as JSON numbers.
  • Override BigDecimal's as_json method; it's called by ActiveSupport and returns a string by default (before invoking the actual JSON encoder).
  • Adapt rescued error classes.
  • Add specs to test JSON encoding/decoding for service instance parameters (create, update, get) and service binding parameters (create, get).

Fixes #4799.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@philippthun philippthun force-pushed the json-decimal-encoding branch 2 times, most recently from a115685 to 3d75f7d Compare January 27, 2026 12:45
- Use Oj consistently for encoding and decoding.
- Remove custom encoder in JSON initializer.
- Configure Oj to encode BigDecimals as JSON numbers.
- Override BigDecimal's 'as_json' method; it's called by ActiveSupport
  and returns a string by default (before invoking the actual JSON
  encoder).
- Adapt rescued error classes.
- Add specs to test JSON encoding/decoding for service instance
  parameters (create, update, get) and service binding parameters
  (create, get).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloud Controller encodes JSON decimal numbers as strings when proxying service broker payloads

1 participant