# Can I set the Brackit context to a Java string?

**URL:** <https://sirix.discourse.group/t/can-i-set-the-brackit-context-to-a-java-string/86>\
**Category:** Uncategorized\
**Created:** [May 3, 2023, 5:58pm UTC](https://sirix.discourse.group/t/can-i-set-the-brackit-context-to-a-java-string/86 "2023-05-03T17:58:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rosswmerrifield](https://yyz2.discourse-cdn.com/free1/user_avatar/sirix.discourse.group/rosswmerrifield/32/47_2.png) [@rosswmerrifield](https://sirix.discourse.group/u/rosswmerrifield)\
**Post date:** [May 3, 2023, 5:58pm UTC](https://sirix.discourse.group/t/can-i-set-the-brackit-context-to-a-java-string/86/1 "2023-05-03T17:58:03Z")

</div>

I’m hoping to use Brackit as an embeddable JSONiq engine for use in a Java app. My use case involves receiving JSON as a string from another program, processing it with XQuery/JSONiq, then returning the result as a JSON string back to the original program.

How can I set these received JSON strings as the input to my XQuery/JSONiq code? None of the examples seem to use this pattern (the examples I have seen so far seem to either include input directly in the XQuery code or use the json-doc() function to read it from the file system). Hope that makes sense.

I am using Brackit 0.3-SNAPSHOT

Thanks,

Ross

---

<div class="post-metadata">

**Author:** ![Jojo](https://yyz2.discourse-cdn.com/free1/user_avatar/sirix.discourse.group/jojo/32/6_2.png) [@Jojo](https://sirix.discourse.group/u/Jojo)\
**Post date:** [May 22, 2023, 4:47pm UTC](https://sirix.discourse.group/t/can-i-set-the-brackit-context-to-a-java-string/86/2 "2023-05-22T16:47:28Z")

</div>

Sorry for thevery late answer, somehow I got no notification…

It is the function `jn:parse` you can use 🙂

Kind regards  
Johannes
