# How parse serialized variables from javascript

**URL:** <https://forum.flowable.org/t/how-parse-serialized-variables-from-javascript/713>\
**Category:** Flowable Engine\
**Created:** [July 11, 2017, 10:08am UTC](https://forum.flowable.org/t/how-parse-serialized-variables-from-javascript/713 "2017-07-11T10:08:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![santi](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/santi/32/202_2.png) [@santi](https://forum.flowable.org/u/santi)\
**Post date:** [July 11, 2017, 10:08am UTC](https://forum.flowable.org/t/how-parse-serialized-variables-from-javascript/713/1 "2017-07-11T10:08:48Z")

</div>

Hi,  
I’m using REST API to integrate engine with my web application (nodejs) but when get serialized variable in octect-stream format I can’t deserialize in javascript. Has anyone solved this problem ?

thanks a lot

---

<div class="post-metadata">

**Author:** ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)\
**Post date:** [July 14, 2017, 3:15pm UTC](https://forum.flowable.org/t/how-parse-serialized-variables-from-javascript/713/2 "2017-07-14T15:15:23Z")

</div>

Ideally you don’t have these serialised variables, but store them using primitives. What’s the use case you’re trying to solve?

To answer your question: you can have a custom REST serialization for those variables using a RestResponseFactory. See [http://www.flowable.org/docs/userguide/index.html#\_general\_flowable\_rest\_principles](http://www.flowable.org/docs/userguide/index.html#_general_flowable_rest_principles) (have to scroll down scroll down a bit to ‘It’s possible to support additional variable-types…’)

---

<div class="post-metadata">

**Author:** ![santi](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/santi/32/202_2.png) [@santi](https://forum.flowable.org/u/santi)\
**Post date:** [July 17, 2017, 3:36pm UTC](https://forum.flowable.org/t/how-parse-serialized-variables-from-javascript/713/3 "2017-07-17T15:36:13Z")

</div>

I need an api entry point to return json complex variables to consum from javascript app. Flowable return binary variables in the hist API REST and I can’t comsum it from javascript

---

<div class="post-metadata">

**Author:** ![PHH](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/phh/32/94_2.png) [@PHH](https://forum.flowable.org/u/PHH)\
**Post date:** [July 17, 2017, 4:02pm UTC](https://forum.flowable.org/t/how-parse-serialized-variables-from-javascript/713/4 "2017-07-17T16:02:18Z")

</div>

Hi,

As Joram says, you can store primitive variables, or create a RestResponseFactory. Can you give a bit more background to your process, what the data is and where is comes from?

Cheers  
Paul.
