을 선호 할 수 있습니다 당신이이 JSON 객체로 데이터를 가져 오기 위해 Content-Type : KDB 응답의 응답 헤더에 application/json을 설정하십시오.
For that .z.ph 함수 사용자 정의 구현을 제공하고 응답 데이터를 설명 할 때 아래 줄을 추가해야합니다.
"HTTP/1.x 200 OK\r\nContent- Type:application/json\r\n\r\n"
샘플 구현이
x[0]: query from browser
x[1]: request header
지금 당신은 당신의 X [0] 쿼리를 처리하기 위해 사용자 정의 구현을 작성해야 입력으로 사전을 얻을 것이다 z.ph 기능에서
.z.ph:{:"HTTP/1.x 200 OK\r\nContent- Type:application/json\r\n\r\n", .j.j table_data }
If query through Http client was http://localhost:2001/?select from t then
x[0] will be "?select%20from%20t" where t is kdb table
you have to decode x[0] string to remove white space and other character in string.
value (decoded string);
"http : // localhost : 5555 /? .jj se 탭에서 강의 "가 작동하지 않습니까? – terrylynch
내가 시도했지만 시도가 안되는 것은 처음이다. 그럴까? 또한 3.2 이전의 kdb의 이전 버전에서 필자는 수동으로 json.k을로드했습니다. – user1427026
'.j.j select from table'이 q 콘솔에서 작동하면 http를 통해 작동해야합니다. 브라우저에서'localhost : 5555/?. j.j select tab'을 열면 어떻게됩니까? –