Skip to content
Advertisement

Tag: json

post html form results to api as json

I want to submit a form and have the values sent to the api in json format and save the response in a variable. When i try this using the below code i get an ‘Internal Server Error’ message. The parameters the api takes are ‘season’, ‘num_teachers’, ‘num_students’. Once it has all the parameters it will send a result response

Capturing signature on a webpage (via tablet screen)

I am trying to write a short code to capture the signature via a tablet screen on a webpage. However, I can’t get the area up that captures that signature. The code I am using, which I have borrowed from other places that do work is: I suspect it has something to do with the links to jquery, unless somebody

Sending Uint8Array (BSON) in a JSON object

I’m using the ‘bson’ npm package in the browser for converting / serializing a JSON object to BSON. The documentation says that it returns a Node.js buffer. The documentation of Node.js says that a buffer is of type ‘Uint8Array’. Now I want to send this Uint8Array in another JSON object (infoJSON) but JSON does not support Uint8Array. I tried to

JSON to XML Using Javascript

I am trying to convert the JSON to XML but not getting exact output.In My JSON having array object it not converting that to XML array.Mainly array object is not converting into XML as expected Actual Output: Expected Output: Please guide me if i am missing anything from the code to get my expected result Answer replace your OBJtoXML function

Advertisement