# Buffer-parser parsing 32bitBE fails

**URL:** <https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135>\
**Category:** Industrial\
**Created:** [28 February 2022 17:07 UTC](https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135 "2022-02-28T17:07:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsail](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsail/32/20176_2.png) [@jsail](https://discourse.nodered.org/u/jsail)\
**Post date:** [28 February 2022 17:07 UTC](https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135/1 "2022-02-28T17:07:45Z")

</div>

I have trouble to parse 32bit Value using buffer-parser node

This is the Input:  
[ff,ff,ef,a0]

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a1bc6bd82f733d0664c297b1c802133cc7f1c5a3.png)

SyntaxError: Unexpected token f in JSON at position 2

My expected Value is:  
-4192

Thanks for help  
Joseph

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 February 2022 17:14 UTC](https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135/2 "2022-02-28T17:14:41Z")

</div>

We are good, but I'm afraid we are not mind readers 🙂

You will have to share the data going into the buffer-parser and how you have it setup (at minimum) for us to help you.

---

<div class="post-metadata">

**Author:** ![mickym2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mickym2/32/36128_2.png) [@mickym2](https://discourse.nodered.org/u/mickym2)\
**Post date:** [28 February 2022 19:50 UTC](https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135/3 "2022-02-28T19:50:26Z")

</div>

For a buffer input you have to convert into decimal numbers.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/9/6904175100dc15d9991f7f045d37f229e2e77664.png)

Then your buffer node does what you expect:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/9/e9871a0a19b8ee1d2925a538e10e4d75d1519712.png)

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 February 2022 20:04 UTC](https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135/4 "2022-02-28T20:04:20Z")

</div>

> [@mickym2](#):
>
> For a buffer input you have to convert into decimal numbers.

Or use strings `["0xff","0xff","0xef","0xa0"]` ...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/c/2cdaf2fbd824917ccf6b569b4b31952814616db2.png)

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/8/78445cbcc4e523e03ad4dff600e91db0e0305603.png)

---

<div class="post-metadata">

**Author:** ![jsail](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jsail/32/20176_2.png) [@jsail](https://discourse.nodered.org/u/jsail)\
**Post date:** [2 March 2022 11:01 UTC](https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135/5 "2022-03-02T11:01:28Z")

</div>

Thank you Steve,

I have seen, the Problem was the inject-node sending the error (not the 'buffer parser')

Cu Joseph

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [1 May 2022 11:01 UTC](https://discourse.nodered.org/t/buffer-parser-parsing-32bitbe-fails/59135/6 "2022-05-01T11:01:49Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
