[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - json-parse string expected

json-parse string expected

Q&A's, tips, howto's

json-parse string expected

Postby joejoe » Sun May 06, 2018 9:49 am

Hi,

(json-parse (exec "curl https://www.asdf.com/asdf.json"))

I am getting the message that a string is expected.

The result of the exec has [text]......[/text] at the beginning and end of what is returned.

Is this why json-parse thinks it is not a string?

I tried (json-parse (string (exec "curl....))) too. Still says a string is expected.

How do I remove the [text] ... [/text] so that the result can be interpreted by (json-parse)?

Thanks!
joejoe
 
Posts: 158
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA

Re: json-parse string expected

Postby TedWalther » Sun May 06, 2018 5:48 pm

Are you sure the link is spelled correctly? When I click the link, I get "page not found".
Cavemen in bearskins invaded the ivory towers of Artificial Intelligence. Nine months later, they left with a baby named newLISP. The women of the ivory towers wept and wailed. "Abomination!" they cried.
TedWalther
 
Posts: 605
Joined: Mon Feb 05, 2007 1:04 am
Location: Abbotsford, BC

Re: json-parse string expected

Postby joejoe » Mon May 07, 2018 1:15 am

joejoe
 
Posts: 158
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests

cron