Tuesday, 24 March 2020

What is getbytes equivalent in nodejs of JAVA?

I have a json :{"user": {"user_id": "147095960","pincode": "","lat": "","long":""},"device": {"ga_id" : "123"},"channel": {"name": "androidapp"},"custom": {"current_page" : "homepage","id":"201894799"}}And a external service apparently converts this JSON to string and returns this byte array :[123, 10, 32, 32, 34, 117, 115, 101, 114, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 32, 34, 117, 115, 101, 114, 95, 105, 100, 34, 58, 32, 34, 49, 52, 55, 48, 57, 53, 57, 54, 48, 34, 44, 10, 32, 32, 32, 32, 32, 32, 34, 112, 105, 110, 99, 111, 100, 101, 34, 58, 32, 34, 34, 44, 10, 32, 32, 32, 32, 32, 32, 34, 108, 97, 116, 34, 58, 32, 34, 34, 44, 10, 32, 32, 32, 32, 32, 32, 34, 108, 111, 110, 103, 34, 58, 34, 34, 10, 32, 32, 32, 125, 44, 10, 32, 32, 34, 100, 101, 118, 105, 99, 101, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 32, 34, 103, 97, 95, 105, 100, 34, 32, 58, 32, 34, 49, 50, 51, 34, 10, 32, 32, 125, 44, 10, 32, 32, 34, 99, 104, 97, 110, 110, 101, 108, 34, 58, 32, 123, 10, 32, 32, 32, 32, 32, 32, 34, 110, 97, 109, 101, 34, 58, 32, 34, 97, 110, 100, 114, 111, 105, 100, 97, 112, 112, 34, 10, 32, 32, 125, 44, 10, 32, 32, 34, 99, 117, 115, 116, 111, 109, 34, 58, 32, 123, 10, 32, 32, 32, 34, 99, 117, 114, 114, 101, 110, 116, 95, 112, 97, 103, 101, 34, 32, 58, 32, 34, 104, 111, 109, 101, 112, 97, 103, 101, 34, 44, 10, 32, 32, 32, 34, 105, 100, 34, 58, 34, 50, 48, 49, 56, 57, 52, 55, 57, 57, 34, 10, 32, 32, 125, 10, 125]​I have been searching for over an hour to find the function to get bytes array but I couldn't in node js. Is there any function to do this?

Submitted March 24, 2020 at 08:49AM by GhostFoxGod

No comments:

Post a Comment