JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?안녕하세요 여러분! WEB JSON 파일의 JSL 다운로드를 계속 시도하고 있으며 JSON 구조가 다르기 때문에 JSL 로그에서 JSON 다운로드에 성공했지만 JSON 파일의 구조가 다르기 때문에 잘 모르겠습니다. JSL을 사용하여 테이블에 정렬하는 방법.
url="http://pdfm.eastmoney.com/EM_UBG_PDTI_Fast/api/js?rtntype=5&token=4f1862fc3b5e77c150a2b985b12db0fd&cb=jQuery18308309053384067384_1570754165747&id=6037121&type=m5k&authorityType=fa&_=1570754540714";
dt = Open(url, JSON );

브라우저를 사용하여 JSON 파일을 다운로드하고 오류에 대한 로그 메시지를 제거한 다음 JSL로 처리하면 테이블을 얻을 수 있지만 원하는 테이블이 아닙니다. 전문가의 조언을 구하십시오. 대단히 감사합니다!
</CODE></PRE><P> </P><P> </P><P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-10-11_15-14.png" style="width: 793px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2019-10-11_15-14.png" style="width: 793px;"><span class="lia-inline-image-display-wrapper" image-alt="2019-10-11_15-14.png" style="width: 793px;"><img src="https://us.v-cdn.net/6038925/uploads/images/19635i3FCFD78C23C486ED/2019-10-11_15-14.png" role="button" title="2019-10-11_15-14.png" alt="2019-10-11_15-14.png" /></span></SPAN></SPAN></P></LINGO-BODY><LINGO-SUB id="lingo-sub-598292" slang="en-US" mode="NONE">Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?</LINGO-SUB><LINGO-BODY id="lingo-body-598292" slang="en-US" mode="NONE"><P>감사해요!</P></LINGO-BODY><LINGO-SUB id="lingo-sub-229168" slang="en-US" mode="NONE">Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?</LINGO-SUB><LINGO-BODY id="lingo-body-229168" slang="en-US" mode="NONE"><P>좋아요.</P><P>크레이지 감사합니다!</P><P> </P><P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-10-12_22-54.png" style="width: 427px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="2019-10-12_22-54.png" style="width: 427px;"><span class="lia-inline-image-display-wrapper" image-alt="2019-10-12_22-54.png" style="width: 427px;"><img src="https://us.v-cdn.net/6038925/uploads/images/19671i81D5B2D99FFC23E3/2019-10-12_22-54.png" role="button" title="2019-10-12_22-54.png" alt="2019-10-12_22-54.png" /></span></SPAN></SPAN></P></LINGO-BODY><LINGO-SUB id="lingo-sub-229165" slang="en-US" mode="NONE">Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?</LINGO-SUB><LINGO-BODY id="lingo-body-229165" slang="en-US" mode="NONE"><P>이것은 다음에 대한 몇 가지 정보가 있습니다.<EM> 글로벌 교체</EM> 옵션 및 몇 가지 예:</P><P><A href="https://community.jmp.com/t5/Uncharted/Regex/ba-p/21008" target="_blank">https://community.jmp.com/t5/Uncharted/Regex/ba-p/21008</A></P><P> </P><P>캐릭터가 무엇인지 잘 모르겠습니다. 이를 나타내기 위해 유니코드 이스케이프를 사용해야 할 수도 있습니다. 여기에서 \!Uxxxx를 참조하세요.</P><P><A href="https://community.jmp.com/t5/Discussions/best-practices-around-special-characters-in-JSL/m-p/214000" target="_blank">https://community.jmp.com/t5/Discussions/best-practices-around-special-characters-in-JSL/mp/214000</A></P><P> </P><P>JMP가 일부 따옴표를 이스케이프 처리하고 있어 혼란스러워 보입니다. 사용<EM> 쓰다()</EM> 이스케이프 없이 테스트를 보는 기능:</P><P> </P><P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="using write() to see strings without escapes" style="width: 759px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="using write() to see strings without escapes" style="width: 759px;"><span class="lia-inline-image-display-wrapper" image-alt="using write() to see strings without escapes" style="width: 759px;"><img src="https://us.v-cdn.net/6038925/uploads/images/19667iFB78CCABEB3149F7/Capture.PNG" role="button" title="Capture.PNG" alt="using write() to see strings without escapes" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">using write() to see strings without escapes</span></span><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">using write() to see strings without escapes</SPAN></SPAN><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">write()를 사용하여 이스케이프 없이 문자열 보기</SPAN></SPAN></P><P>쉼표 뒤에 줄 바꿈으로 텍스트 형식을 다시 지정했습니다. 실제로 JSON 소스에서 전송된 대로 모두 함께 실행됩니다. 의 데이터<EM> txt</EM> 는 단지 " 이지만 JMP가 값을 인용 문자열로 표시할 때(예: 인쇄 사용) JMP는 \!"를 사용하여 포함된 "을 이스케이프 처리합니다.</P><P> </P><P>다음은 print()를 사용하는 것입니다. 첫 번째와 마지막 "은 이스케이프되지 않습니다.</P><P> </P><P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="internal " are escaped with \!" style="width: 812px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="internal " are escaped with \!" style="width: 812px;"><span class="lia-inline-image-display-wrapper" image-alt="internal " are escaped with \!" style="width: 812px;"><img src="https://us.v-cdn.net/6038925/uploads/images/19669i63D97B19AB857285/Capture3.PNG" role="button" title="Capture3.PNG" alt="internal " are escaped with \!" /><span class="lia-inline-image-caption" onclick="event.preventDefault();">internal " are escaped with \!</span></span><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">internal " are escaped with \!</SPAN></SPAN><SPAN class="lia-inline-image-caption" onclick="event.preventDefault();">내부 "는 \!로 이스케이프됩니다.</SPAN></SPAN></P></LINGO-BODY><LINGO-SUB id="lingo-sub-229160" slang="en-US" mode="NONE">Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?</LINGO-SUB><LINGO-BODY id="lingo-body-229160" slang="en-US" mode="NONE"><P><SPAN class="transSent">나는 어떻게 쓰는지 모른다<SPAN> 정규식</SPAN> JSL의 코드를 교체하십시오.</SPAN><SPAN class="transSent"> 매우 감사합니다!</SPAN></P><P> </P><P><SPAN class="transSent">다음 세 문자를 모두 바꿉니다.<BR /> \"!</SPAN></P><P> </P><PRE><CODE class=" language-jsl">txt=loadtextfile("C:\Users\Administrator\Desktop\Untitled 6.txt");
txt = regex(txt,"\\","");
Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?JSL을 사용하여 Table Headers 없이 TXT 텍스트로 일반 처리 후 dt를 저장한 다음 JSL을 사용하여 텍스트를 TXT로 읽으려고 합니다. TXT의 지정된 문자를 null로 정규식으로 어떻게 바꿀 수 있습니까?

Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?Craige_Hales님, 감사합니다! 이 정규식 코드를 사용하여 VBA에서 정규식을 처리하는 방법을 결합할 수 있었습니다.
그러나 JSL에서 정규식 처리를 사용하는 것은 계속해서 배울 것입니다.Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?를 분할해야 합니다. 데이터 열; JMP는 정확히 JSON 파일에 있는 것을 가져왔습니다...다른 열 이름은 없고 데이터 단일 필드입니다. 다음과 유사한 수식을 사용하여 필요한 이름으로 새 열을 만들 수 있습니다.
use the word() function with comma for the delimiter; this example selects the 3rd item between commasuse the word() function with comma for the delimiter; this example selects the 3rd item between commas구분 기호로 쉼표와 함께 word() 함수를 사용하십시오. 이 예에서는 쉼표 사이의 세 번째 항목을 선택합니다.
다운로드를 직접 편집하지 않으려면 다음과 같이 할 수 있습니다.
txt=loadtextfile("http://pdfm.eastmoney.com/EM_UBG_PDTI_Fast/api/js?rtntype=5&token=4f1862fc3b5e77c150a2b985b12db0fd&cb=jQuery18308309053384067384_1570754165747&id=6037121&type=m5k&authorityType=fa&_=1570754540714");
txt = regex(txt,"\((.*)\)$","\1"); // strip the jQuery18308309053384067384_1570754165747( ...json data... ) wrapper
dt = jsontodatatable(txt);정규식은 다음을 사용합니다.
\( -- 문자 그대로 여는 괄호입니다.
(.*) -- 첫 번째 역참조로 가능한 한 많이 가져오는 캡처링 그룹입니다.
\)$ -- 이것은 문자열의 끝에 있는 리터럴 닫기 괄호입니다.
그 다음에
"\1"은 정규식의 결과가 괄호 사이에서 찾은 캡처링 그룹임을 의미합니다.
Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?WEB에서 직접 JSON을 다운로드하고 자동으로 처리하여 정규화된 테이블을 얻기 위해 JSL을 작성하는 방법은 무엇입니까? 감사해요!
Re: JSL을 사용하여 웹 다운로드에서 JSON 파일을 처리하는 방법을 계속하시겠습니까?
이 코드로 처리할 수 있는 게시물을 검색했지만 시도했지만 실패했습니다.
headers( {"…… "} )