Skip to content

fix: MBFunctionCall stored JSON strings instead of raw values (double-encoding)#34

Merged
alubbock merged 1 commit intomainfrom
fix/functioncall-encoding
Mar 13, 2026
Merged

fix: MBFunctionCall stored JSON strings instead of raw values (double-encoding)#34
alubbock merged 1 commit intomainfrom
fix/functioncall-encoding

Conversation

@alubbock
Copy link
Copy Markdown
Owner

Summary

  • capture_function_args_and_kwargs called self.to_json(v) and stored the resulting JSON string in bm_data['args']/bm_data['kwargs']. When output_result later serialised bm_data, these strings were serialised again, turning e.g. {'k': 1} into the escaped string "{\"k\": 1}" in the output.
  • Fixed to call self.to_json(v) only as an encodability check, then store the raw value v — matching how MBReturnValue handles return values
  • Adds test_functioncall_args_not_double_encoded to verify args/kwargs round-trip as their native Python types

@alubbock alubbock force-pushed the fix/functioncall-encoding branch from a60167d to 0005314 Compare March 12, 2026 23:50
@alubbock alubbock merged commit 5fd57a8 into main Mar 13, 2026
20 checks passed
@alubbock alubbock deleted the fix/functioncall-encoding branch March 13, 2026 00:13
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.

1 participant