Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONObject in java can not use get method with default value #567

Open
githubbbbber opened this issue Oct 12, 2024 · 1 comment
Open

JSONObject in java can not use get method with default value #567

githubbbbber opened this issue Oct 12, 2024 · 1 comment

Comments

@githubbbbber
Copy link

Describe the bug
I pass a JSONObject in java to python env, but I can't use this_json_object.get("key1", [[]]).
the json object is like {"key1":[[{"innerKey":"innerValue"}]]}
I can use getattr(this_json_object, 'get')("key1", [[]]) or this_json_object.get("key1") to get the value

Environment (please complete the following information):

  • OS Platform, Distribution, and Version: linux OS
  • Python Distribution and Version: 3.11
  • Java Distribution and Version: 11
  • Jep Version: 4.20
@bsteffensmeier
Copy link
Member

Which package is JSONObject in. Can you link the source or javadoc for JSONObject? What error do you get when you use this_json_object.get("key1", [[]])?

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

No branches or pull requests

2 participants