Skip to content

Fix Box<Json> compatibility with sea-orm 2.0.0-rc#243

Closed
gronke wants to merge 1 commit into
SeaQL:mainfrom
gronke:fix-boxed-json
Closed

Fix Box<Json> compatibility with sea-orm 2.0.0-rc#243
gronke wants to merge 1 commit into
SeaQL:mainfrom
gronke:fix-boxed-json

Conversation

@gronke
Copy link
Copy Markdown

@gronke gronke commented Jan 7, 2026

Handle upstream sea-query change where Value::Json now uses Box<serde_json::Value> instead of serde_json::Value directly.

PR Info

  • Closes
  • Dependencies:
    • Requires sea-orm 2.0.0-rc or later
  • Dependents:

New Features

  • N/A

Bug Fixes

  • Fix compatibility with sea-orm 2.0.0-rc where sea_query::Value::Json now wraps the JSON value in a Box. Updated all locations that construct or destructure Value::Json to properly box/unbox the value.

Breaking Changes

  • Requires sea-orm 2.0.0-rc or later due to the upstream Value::Json(Box<...>) change

Changes

  • macros/src/convert_output.rs: Dereference boxed json before cloning ((*json).clone())
  • src/builder_context/types_map.rs: Wrap json value in Box::new() when constructing Value::Json
  • src/outputs/entity_object.rs: Dereference boxed json before cloning ((*it).clone())

Handle upstream sea-query change where Value::Json now uses
Box<serde_json::Value> instead of serde_json::Value directly.
@tyt2y3
Copy link
Copy Markdown
Member

tyt2y3 commented Jan 7, 2026

thank you. sorry, I didn't get to fix this part.
the reason was serde_json with indexmap can balloon Value to 72 bytes and it turned out to be a real problem to stability in prod
so sadly we'll have change JSON back to boxed

@tyt2y3
Copy link
Copy Markdown
Member

tyt2y3 commented Jan 7, 2026

Thank you for your contribution. I've applied the fix in 0435d10

@tyt2y3 tyt2y3 closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants