<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Betreff: READ string too long on input in Visual LISP, AutoLISP and General Customization Forum</title>
    <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321790#M78407</link>
    <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, at this point I think it's pretty safe to say I'm looking for a JSON to Lisp parser haha. I guess I wasn't ready to accept that in my mind yet.&lt;/P&gt;&lt;P&gt;Looks like I have quite a bit of work in front of me. I can't find much that seems ready to use by just Googling for a Parser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for helping look into it though!&lt;/P&gt;</description>
    <pubDate>Mon, 17 Feb 2020 01:04:52 GMT</pubDate>
    <dc:creator>CodeDing</dc:creator>
    <dc:date>2020-02-17T01:04:52Z</dc:date>
    <item>
      <title>READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321624#M78397</link>
      <description>&lt;P&gt;I'm trying to convert a JSON response to a list which I can then manipulate with AutoLISP.&lt;/P&gt;&lt;P&gt;Normally I can accomplish that with this simple function:&lt;/P&gt;&lt;PRE&gt;(defun JSON-&amp;gt;LIST (json / tmp dbl nwl)
;json - string, as json data
;returns - list or nil, list of data converted from json
(if (eq 'STR (type json)) (read (vl-string-translate "[]{}:," "()()  " json)) nil)
);defun&lt;/PRE&gt;&lt;P&gt;However, the &lt;A href="http://help.autodesk.com/view/ACD/2015/ENU/?guid=GUID-5B50BB3E-C244-46E8-85D8-6A2D48B1FE51" target="_blank" rel="noopener"&gt;READ&lt;/A&gt; function must have a limit which I cannot directly find. Because when I send the Attached JSON information as a single string to the function, I get this error:&lt;/P&gt;&lt;PRE&gt;; error: string too long on input&lt;/PRE&gt;&lt;P&gt;I have tried removing excess spaces and newline characters with:&lt;/P&gt;&lt;P&gt;- (while (vl-string-search "&amp;nbsp; " str) (setq str (vl-string-subst " " "&amp;nbsp; ")))&lt;/P&gt;&lt;P&gt;- (while (vl-string-search "\n" str) (setq str (vl-string-subst " " "\n")))&lt;/P&gt;&lt;P&gt;Still no luck. (my shortened string length comes to &lt;STRONG&gt;37,367 characters&lt;/STRONG&gt;).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I was hoping that I could create any function (perhaps recursive?) that will allow me to merely construct lists on the fly since,&amp;nbsp;&lt;STRONG&gt;in THIS case&lt;/STRONG&gt;, I know that I have many 'Lists' inside of my JSON data. Then I could break my 'Reads' into smaller chunks... I just am not able to understand how my workflow should go and I have been racking my brain on this for hours..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't a function but hopefully it can help you get an idea of how i'm trying to break this down:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Instead of this:
(read "(\"abc\" 123 (\"def\" 456) (\"ghi\" 789) \"jkl\" 000)")
...Do this...
(list "abc" 123 (list "def" 456) (list "ghi" 789) "jkl" 000)&lt;/PRE&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 21:55:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321624#M78397</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-16T21:55:16Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321653#M78398</link>
      <description>&lt;P&gt;You have Lisp at your disposal, so program a function to find out the limit!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Symbolname length limit = 2305 (works) 2306 (too long)&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 22:40:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321653#M78398</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-02-16T22:40:06Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321664#M78399</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/71745"&gt;@cadffm&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for helping me find the limit. However, I cannot just break my string down into multiple strings so easily.. because if I were to run the read function on a string that is an incomplete list, then it will error out.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;(read "(\"here is some data\" \"but the list is incompl\"")&lt;BR /&gt;; error: malformed list on input&lt;/PRE&gt;&lt;P&gt;Therefor, i cannot just send ANY partial string to my READ function.. It must be a complete list.. which I must also remember where the position of this list is in my overall string (the complete list of JSON data).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 22:52:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321664#M78399</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-16T22:52:36Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321686#M78400</link>
      <description>&lt;P&gt;I am not familar with that stuff (it's ok for me),&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but you can not change basic API limits.&lt;/P&gt;
&lt;P&gt;The maximum length of a symnolname is 2305 (said my system),&lt;/P&gt;
&lt;P&gt;nothing to do with the read function.&lt;/P&gt;
&lt;P&gt;(But read convert a string to a symbol, and symbolname is limited to 2305)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you sure that you need that read in this way?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Sorry again because i am not familar with that)&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 23:15:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321686#M78400</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-02-16T23:15:16Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321689#M78401</link>
      <description>&lt;P&gt;You can (read-char which does just that a single character at a time so if you say have 50&amp;nbsp; character strings you do just that in a repeat.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 23:21:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321689#M78401</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-02-16T23:21:20Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321695#M78402</link>
      <description>&lt;P&gt;&amp;gt;"This isn't a function but hopefully it can help you get an idea of how i'm trying to break this down:"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is easy, easy to understand and easy to do,&lt;/P&gt;
&lt;P&gt;but i can not see what this "sample" to do with your special *.txt content.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A shorted sample from your *.txt&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 87 for example (shorted!)&lt;/P&gt;
&lt;P&gt;"points" : "iomiGhsocNIo@c@oDGg@AASaB[_CGi@E_@EWAGIo@?EA.........................ICSAI?KAI?O?M?Q?G?G@I@Q?I@G?EAE?G?EACAKa@{Ca@oCc@eDEW[wBYwB]eCCSYsBQsAMeA_@qCa@wCa@qC[_CAIWgBe@gDU_BMcAOiAUyAWiB]aCOeAg@kDUuACQ?ICUGs@KaBAUCYEq@KaB"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"points":&amp;nbsp; is ok, you can check the string from left to the right to find this part from the Line87.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;But i can not understand what the rest is or why do you need this as a symbol - It can not be the right or the only way.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Hopeful you find another helper with knowledge about Json and what you try,&lt;/P&gt;
&lt;P&gt;i am out at this point&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;I would love to look at it, but currently I don't have the time for such complex things, I have to start at 0 for it.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 23:29:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321695#M78402</guid>
      <dc:creator>cadffm</dc:creator>
      <dc:date>2020-02-16T23:29:33Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321711#M78403</link>
      <description>&lt;P&gt;Not sure if this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(setq fo (open "d:\\acadtemp\\testchar.txt" "r"))
(while (setq ans (read-char fo))
(princ "\n")
(princ (chr ans))
)
(close fo)&lt;/PRE&gt;</description>
      <pubDate>Sun, 16 Feb 2020 23:40:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321711#M78403</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-02-16T23:40:18Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321714#M78404</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/71745"&gt;@cadffm&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;I am not looking to return a Symbol from the read function. I am trying to return a List.&lt;/P&gt;&lt;P&gt;Since the read function returns '...the first list or atom obtained from a string...'&lt;/P&gt;&lt;P&gt;...and the string returned from (vl-string-translate "[]{}:," "()() " json) is one big List...&lt;/P&gt;&lt;P&gt;...I am trying to save the value from Read as a List inside a variable.&lt;/P&gt;&lt;P&gt;...Which means that ALL of the json data would be just one large list I can easily manipulate.&lt;/P&gt;&lt;P&gt;However, since my string being passed into Read is too long, I need to SOMEHOW loop through my string and break it down into smaller Lists, either with or without the Read function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the input.&lt;/P&gt;&lt;P&gt;But, the Read-Char function does not return a list nor provide me with more guidance as to how to come toward a solution of my question. I understand the concept of looping through characters, but as I stated previously, I cannot think of a function that will help me return actual Lists that I can save as a variable when I pass in my json String.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Sun, 16 Feb 2020 23:44:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321714#M78404</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-16T23:44:29Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321746#M78405</link>
      <description>&lt;P&gt;&amp;nbsp;Is this what your talking about ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;To parse -- to separate into parts.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; font-family: -apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen-Sans,Ubuntu,Cantarell,'Helvetica Neue',sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;When JSON data is received, it comes as a massive concatenation of characters (one huge string).&amp;nbsp; Inside of this string is encoded tags as well as "name : value" pairs.&amp;nbsp; The job of the parser is to take this huge string and break it up into the data structures (Objects?) that are indicated by the string.&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The answers are here in google "&lt;FONT&gt;json lisp parser" not sure about a Autocad lisp variant. They talk about Gb files. Did not look to far.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 00:24:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321746#M78405</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-02-17T00:24:00Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321784#M78406</link>
      <description>&lt;P&gt;Look into VBA found pretty quick some good examples and code to download.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT&gt;&lt;A href="https://www.youtube.com/watch?v=CFFLRmHsEAs&amp;amp;feature=youtu.be" target="_blank"&gt;https://www.youtube.com/watch?v=CFFLRmHsEAs&amp;amp;feature=youtu.be&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 00:55:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321784#M78406</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-02-17T00:55:52Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321790#M78407</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6254908"&gt;@Sea-Haven&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, at this point I think it's pretty safe to say I'm looking for a JSON to Lisp parser haha. I guess I wasn't ready to accept that in my mind yet.&lt;/P&gt;&lt;P&gt;Looks like I have quite a bit of work in front of me. I can't find much that seems ready to use by just Googling for a Parser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for helping look into it though!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 01:04:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9321790#M78407</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-17T01:04:52Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9322052#M78408</link>
      <description>&lt;P&gt;If you find a VBA answer you can call a VBA from lisp&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;(vl-vbaload "P:/AutoDESK/VBA/acces-rev2.dvb") 
(vl-vbarun "draw_vehicle")&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Feb 2020 06:44:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9322052#M78408</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-02-17T06:44:22Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323016#M78409</link>
      <description>&lt;P&gt;A few years ago I needed a JSON -&amp;gt; Lisp parser, didn't find one for AutoLISP. Several for Common Lisp, though.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you don't like working with VBA (or possibly C#), you could do what we are doing: run the parser in a separate Common Lisp program, write the parsed result as a convenient list into a file and read that with AutoLISP.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 14:15:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323016#M78409</guid>
      <dc:creator>martti.halminen</dc:creator>
      <dc:date>2020-02-17T14:15:07Z</dc:date>
    </item>
    <item>
      <title>Betreff: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323446#M78410</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/569672"&gt;@martti.halminen&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm interested in your response. I've never ran a Common Lisp routine though. Are they the same file extension? Do I need an IDE? Can you maybe post a sample routine for me (doesn't have to be a parser routine) and example how to call it with AutoLISP?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd definitely appreciate it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 17:24:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323446#M78410</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-17T17:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323593#M78411</link>
      <description>&lt;P&gt;What will you do with that JSON data. Do you have to recreate whole database structure, or are you interested just about some data that are siblings to some parent&amp;nbsp; object (let say routes-&amp;gt;legs-&amp;gt;steps in your sample). I would attack this task using sequential read line by line and look for particular data only.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 18:30:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323593#M78411</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-02-17T18:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323706#M78412</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure why it didn't cross my mind to use those newline characters to my advantage!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use the newline character approach "\n" because I do not write the JSON data to a text file, I get it as response text straight from the browser.. I guess thankfully, Google returns it formatted (for some reason) so I can use those newline characters to my advantage.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, once I get rid of those painful "points" elements, then it's smooth sailing for the Read function to continue the heavy lifting!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the inspiration!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's my finished function:&lt;/P&gt;&lt;PRE&gt;(defun DirectionsJSON-&amp;gt;LIST (json / tmp str)
&lt;FONT color="#FF6600"&gt;;json - string, of json data (as returned by Google Directions API)
;returns - list, of converted JSON data
;helper functions(s)&lt;/FONT&gt;
  (defun LM:str-&amp;gt;lst (str del / pos)
    &lt;FONT color="#FF6600"&gt;;By Lee Mac: http://www.lee-mac.com/stringtolist.html&lt;/FONT&gt;
    (if (setq pos (vl-string-search del str))
      (cons (substr str 1 pos) (LM:str-&amp;gt;lst (substr str (+ pos 1 (strlen del))) del))
      (list str)
    );if
  );defun
(while (vl-string-search ":" json) (setq json (vl-string-subst "" ":" json)))
(setq json (vl-string-translate "[]{}," "()() " json)
      json (LM:str-&amp;gt;lst json "\n")
      tmp '())
(foreach str json
  (if (not (or (&amp;gt; (strlen str) 2000)
  	       (wcmatch str "*\"points\"*")))
    (setq tmp (cons (vl-string-trim " \t\n" str) tmp))
  );if
);foreach
(setq json (apply 'strcat (reverse tmp)))
(read json)
);defun&lt;/PRE&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 19:20:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323706#M78412</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-17T19:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323725#M78413</link>
      <description>&lt;P&gt;Actually, your post has reminded me about one of my old private project I have been working on at a time when Autodesk had active project "Butterfly" as one of test environments for Autodesk 360. I have been working on a in-browser CAD like environment, and writing JSON parser (for CAD) was one of the task on my long to-do list that I never started working on. Unfortunately W3C specifications for technology behind it changed so often that I stopped development, but always hopping that once they'll finally figure it out. After 10 years almost nothing changed. Maybe its a time to restart my working on it. Here are some of the screenshots from my beta.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="slope31.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/730810i5DB0B8EA2F63BF89/image-size/large?v=v2&amp;amp;px=999" role="button" title="slope31.jpg" alt="slope31.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="slope32.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/730812i8E46376D002658E5/image-size/large?v=v2&amp;amp;px=999" role="button" title="slope32.jpg" alt="slope32.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="slope33.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/730811i0077BB6AD89FEB38/image-size/large?v=v2&amp;amp;px=999" role="button" title="slope33.jpg" alt="slope33.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 19:32:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323725#M78413</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-02-17T19:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323747#M78414</link>
      <description>&lt;P&gt;JSON data are mostly written in human readable form. It is a really good database form applicable to almost anything and with many sub specifications. I personally often use GeoJSON for transferring some geolocation data to&amp;nbsp; state cadastre.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 19:46:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323747#M78414</guid>
      <dc:creator>hak_vz</dc:creator>
      <dc:date>2020-02-17T19:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323896#M78415</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556"&gt;@hak_vz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not to detract too much, but I use API calls to ArcGIS GeoServices all the time, which I can have return GeoJSON. I use the Read function to translate these all the time to lists, and create the linework directly into AutoCAD using a recursive function. It's a beauty and a life saver.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;~DD&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 20:47:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9323896#M78415</guid>
      <dc:creator>CodeDing</dc:creator>
      <dc:date>2020-02-17T20:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: READ string too long on input</title>
      <link>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9324141#M78416</link>
      <description>&lt;P&gt;If there are new line in the file then using what I posted about (read-char just look for 10 which is a linefeed.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 00:41:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/read-string-too-long-on-input/m-p/9324141#M78416</guid>
      <dc:creator>Sea-Haven</dc:creator>
      <dc:date>2020-02-18T00:41:05Z</dc:date>
    </item>
  </channel>
</rss>

