newLISP Fan Club

Forum => newLISP in the real world => Topic started by: Kirill on May 05, 2021, 12:44:38 AM

Title: CGI and JSON
Post by: Kirill on May 05, 2021, 12:44:38 AM
Greetings!



Never thought of it before, but with json-parse being a built-in function, it's easy to check if CONTENT_TYPE is application/json and then parse POST-ed data as JSON and otherwise as old skool form data.



Now I can move on to build my lightweight webhook processing engine in newLISP. Yay!



K.
Title: Re: CGI and JSON
Post by: Kirill on May 05, 2021, 01:47:43 AM
Very lightweight and simple. Does what I need.
Title: Re: CGI and JSON
Post by: Kirill on May 05, 2021, 07:26:26 AM
Quote
Never thought of it before, but with json-parse being a built-in function, it's easy to check if CONTENT_TYPE is application/json and then parse POST-ed data as JSON and otherwise as old skool form data.


newLISP JSON parsing seem to choke when JSON lines end with rn rather than n.