亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ulkjson.pas

?? json delphi component
?? PAS
?? 第 1 頁 / 共 4 頁
字號:
begin
  js := FieldByIndex[idx] as TlkJSONstring;
  if not assigned(js) then result := ''
  else result := vartostr(js.Value);
end;

function TlkJSONobject.getWideString(idx: Integer): WideString;
var
  js:TlkJSONstring;
begin
  js := FieldByIndex[idx] as TlkJSONstring;
  if not assigned(js) then result := ''
  else result := VarToWideStr(js.Value);
end;

function TlkJSONobject.getDouble(nm: String): Double;
begin
  result := getDouble(IndexOfName(nm));
end;

function TlkJSONobject.getInt(nm: String): Integer;
begin
  result := getInt(IndexOfName(nm));
end;

function TlkJSONobject.getString(nm: String): String;
begin
  result := getString(IndexOfName(nm));
end;

function TlkJSONobject.getWideString(nm: String): WideString;
begin
  result := getWideString(IndexOfName(nm));
end;

function TlkJSONobject.getBoolean(idx: Integer): Boolean;
var
  jb:TlkJSONboolean;
begin
  jb := FieldByIndex[idx] as TlkJSONboolean;
  if not assigned(jb) then result := false
  else result := jb.Value;
end;

function TlkJSONobject.getBoolean(nm: String): Boolean;
begin
  result := getBoolean(IndexOfName(nm));
end;

{ TlkJSON }

class function TlkJSON.GenerateText(obj: TlkJSONbase): string;
var
{$IFDEF HAVE_FORMATSETTING}
  fs: TFormatSettings;
{$ENDIF}
  pt1,pt0,pt2:PAnsiChar;
  ptsz:cardinal;

{$ifndef NEW_STYLE_GENERATE}
  function gn_base(obj: TlkJSONbase): string;
  var
    ws: string;
    i, j: Integer;
    xs: TlkJSONstring;
  begin
    result := '';
    if not assigned(obj) then exit;
    if obj is TlkJSONnumber then
      begin
{$ifdef HAVE_FORMATSETTING}
        result := FloatToStr(TlkJSONnumber(obj).FValue, fs);
{$else}
        result := FloatToStr(TlkJSONnumber(obj).FValue);
        i := pos(DecimalSeparator, result);
        if (DecimalSeparator <> '.') and (i > 0) then
          result[i] := '.';
{$endif}
      end
    else if obj is TlkJSONstring then
      begin
        ws := UTF8Encode(TlkJSONstring(obj).FValue);
        i := 1;
        result := '"';
        while i <= length(ws) do
          begin
            case ws[i] of
              '/', '\', '"': result := result + '\' + ws[i];
              #8: result := result + '\b';
              #9: result := result + '\t';
              #10: result := result + '\n';
              #13: result := result + '\r';
              #12: result := result + '\f';
            else
              if ord(ws[i]) < 32 then
                result := result + '\u' + inttohex(ord(ws[i]), 4)
              else
                result := result + ws[i];
            end;
            inc(i);
          end;
        result := result + '"';
      end
    else if obj is TlkJSONboolean then
      begin
        if TlkJSONboolean(obj).FValue then
          result := 'true'
        else
          result := 'false';
      end
    else if obj is TlkJSONnull then
      begin
        result := 'null';
      end
    else if obj is TlkJSONlist then
      begin
        result := '[';
        j := TlkJSONobject(obj).Count - 1;
        for i := 0 to j do
          begin
            if i > 0 then result := result + ',';
            result := result + gn_base(TlkJSONlist(obj).Child[i]);
          end;
        result := result + ']';
      end
    else if obj is TlkJSONobjectmethod then
      begin
        try
          xs := TlkJSONstring.Create;
          xs.FValue := TlkJSONobjectmethod(obj).FName;
          result := gn_base(TlkJSONbase(xs)) + ':';
          result := result +
            gn_base(TlkJSONbase(TlkJSONobjectmethod(obj).FValue));
        finally
          if assigned(xs) then FreeAndNil(xs);
        end;
      end
    else if obj is TlkJSONobject then
      begin
        result := '{';
        j := TlkJSONobject(obj).Count - 1;
        for i := 0 to j do
          begin
            if i > 0 then result := result + ',';
            result := result + gn_base(TlkJSONobject(obj).Child[i]);
          end;
        result := result + '}';
      end;
  end;
{$else}
  procedure get_more_memory;
  var delta: Integer;
  begin
    delta := 20000;
    if pt0 = nil then
      begin
        pt0 := AllocMem(delta);
        ptsz := 0;
        pt1 := pt0;
      end
    else
      begin
        ReallocMem(pt0,ptsz+delta);
        pt1 := pointer(cardinal(pt0)+ptsz);
      end;
    ptsz := ptsz + delta;
    pt2 := pointer(cardinal(pt1)+delta);
  end;

  procedure mem_ch(ch:char);
  begin
    if pt1 >= pt2 then get_more_memory;
    pt1^ := ch;
    inc(pt1);
  end;

  procedure mem_write(rs: String);
  var i: Integer;
  begin
    for i := 1 to length(rs) do
      begin
        if pt1 >= pt2 then get_more_memory;
        pt1^ := rs[i];
        inc(pt1);
      end;
  end;

  procedure gn_base(obj: TlkJSONbase);
  var
    ws: string;
    i, j: Integer;
    xs: TlkJSONstring;
  begin
    if not assigned(obj) then exit;
    if obj is TlkJSONnumber then
      begin
{$ifdef HAVE_FORMATSETTING}
        mem_write(FloatToStr(TlkJSONnumber(obj).FValue, fs));
{$else}
        ws := FloatToStr(TlkJSONnumber(obj).FValue);
        i := pos(DecimalSeparator, ws);
        if (DecimalSeparator <> '.') and (i > 0) then ws[i] := '.';
        mem_write(ws);
{$endif}
      end
    else if obj is TlkJSONstring then
      begin
        ws := UTF8Encode(TlkJSONstring(obj).FValue);
        i := 1;
        mem_ch('"');
        while i <= length(ws) do
          begin
            case ws[i] of
              '/', '\', '"':
                begin
                  mem_ch('\');
                  mem_ch(ws[i]);
                end;
              #8: mem_write('\b');
              #9: mem_write('\t');
              #10: mem_write('\n');
              #13: mem_write('\r');
              #12: mem_write('\f');
            else
              if ord(ws[i]) < 32 then
                mem_write('\u' + inttohex(ord(ws[i]), 4))
              else
                mem_ch(ws[i]);
            end;
            inc(i);
          end;
        mem_ch('"');
      end
    else if obj is TlkJSONboolean then
      begin
        if TlkJSONboolean(obj).FValue then
          mem_write('true')
        else
          mem_write('false');
      end
    else if obj is TlkJSONnull then
      begin
        mem_write('null');
      end
    else if obj is TlkJSONlist then
      begin
        mem_ch('[');
        j := TlkJSONobject(obj).Count - 1;
        for i := 0 to j do
          begin
            if i > 0 then mem_ch(',');
            gn_base(TlkJSONlist(obj).Child[i]);
          end;
        mem_ch(']');
      end
    else if obj is TlkJSONobjectmethod then
      begin
        try
          xs := TlkJSONstring.Create;
          xs.FValue := TlkJSONobjectmethod(obj).FName;
          gn_base(TlkJSONbase(xs));
          mem_ch(':');
          gn_base(TlkJSONbase(TlkJSONobjectmethod(obj).FValue));
        finally
          if assigned(xs) then FreeAndNil(xs);
        end;
      end
    else if obj is TlkJSONobject then
      begin
        mem_ch('{');
        j := TlkJSONobject(obj).Count - 1;
        for i := 0 to j do
          begin
            if i>0 then mem_ch(',');
            gn_base(TlkJSONobject(obj).Child[i]);
          end;
        mem_ch('}');
      end;
  end;
{$endif NEW_STYLE_GENERATE}

begin
{$ifdef HAVE_FORMATSETTING}
  GetLocaleFormatSettings(GetThreadLocale, fs);
  fs.DecimalSeparator := '.';
{$endif}
{$ifdef NEW_STYLE_GENERATE}
  pt0 := nil;
  get_more_memory;
  gn_base(obj);
  mem_ch(#0);
  result := string(pt0);
  freemem(pt0);
{$else}
  result := gn_base(obj);
{$endif}
end;

class function TlkJSON.ParseText(const txt: string): TlkJSONbase;
{$ifdef HAVE_FORMATSETTING}
var
  fs: TFormatSettings;
{$endif}

  function js_base(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean; forward;

  function xe(idx: Integer): Boolean;{$IFDEF FPC}inline;{$ENDIF}
  begin
    result := idx <= length(txt);
  end;

  procedure skip_spc(var idx: Integer);{$IFDEF FPC}inline;{$ENDIF}
  begin
    while (xe(idx)) and (ord(txt[idx]) < 33) do
      inc(idx);
  end;

  procedure add_child(var o, c: TlkJSONbase);
  var
    i: Integer;
  begin
    if o = nil then
      begin
        o := c;
      end
    else
      begin
        if o is TlkJSONobjectmethod then
          begin
            TlkJSONobjectmethod(o).FValue := c;
          end
        else if o is TlkJSONlist then
          begin
            TlkJSONlist(o)._Add(c);
          end
        else if o is TlkJSONobject then
          begin
            i := TlkJSONobject(o)._Add(c);
            if TlkJSONobject(o).UseHash then
              TlkJSONobject(o).ht.AddPair(TlkJSONobjectmethod(c).Name, i);
          end;
      end;
  end;

  function js_boolean(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean;
  var
    js: TlkJSONboolean;
  begin
    skip_spc(idx);
    if copy(txt, idx, 4) = 'true' then
      begin
        result := true;
        ridx := idx + 4;
        js := TlkJSONboolean.Create;
        js.FValue := true;
        add_child(o, TlkJSONbase(js));
      end
    else if copy(txt, idx, 5) = 'false' then
      begin
        result := true;
        ridx := idx + 5;
        js := TlkJSONboolean.Create;
        js.FValue := false;
        add_child(o, TlkJSONbase(js));
      end
    else
      begin
        result := false;
      end;
  end;

  function js_null(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean;
  var
    js: TlkJSONnull;
  begin
    skip_spc(idx);
    if copy(txt, idx, 4) = 'null' then
      begin
        result := true;
        ridx := idx + 4;
        js := TlkJSONnull.Create;
        add_child(o, TlkJSONbase(js));
      end
    else
      begin
        result := false;
      end;
  end;

  function js_integer(idx: Integer; var ridx: Integer): Boolean;
  begin
    result := false;
    while (xe(idx)) and (txt[idx] in ['0'..'9']) do
      begin
        result := true;
        inc(idx);
      end;
    if result then ridx := idx;
  end;

  function js_number(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean;
  var
    js: TlkJSONnumber;
    ws: string;
{$IFNDEF HAVE_FORMATSETTING}
    i: Integer;
{$ENDIF}
  begin
    skip_spc(idx);
    result := xe(idx);
    if not result then exit;
    if txt[idx] in ['+', '-'] then
      begin
        inc(idx);
        result := xe(idx);
      end;
    if not result then exit;
    result := js_integer(idx, idx);
    if not result then exit;
    if (xe(idx)) and (txt[idx] = '.') then
      begin
        inc(idx);
        result := js_integer(idx, idx);
        if not result then exit;
      end;
    if (xe(idx)) and (txt[idx] in ['e', 'E']) then
      begin
        inc(idx);
        if (xe(idx)) and (txt[idx] in ['+', '-']) then inc(idx);
        result := js_integer(idx, idx);
        if not result then exit;
      end;
    if not result then exit;
    js := TlkJSONnumber.Create;
    ws := copy(txt, ridx, idx - ridx);
{$IFDEF HAVE_FORMATSETTING}
    js.FValue := StrToFloat(ws, fs);
{$ELSE}
    i := pos('.', ws);
    if (DecimalSeparator <> '.') and (i > 0) then
      ws[pos('.', ws)] := DecimalSeparator;
    js.FValue := StrToFloat(ws);
{$ENDIF}
    add_child(o, TlkJSONbase(js));
    ridx := idx;
  end;

  function js_string(idx: Integer; var ridx: Integer; var o:
    TlkJSONbase): Boolean;
  var
    js: TlkJSONstring;
    fin: Boolean;
    ws: WideString;
  begin
    skip_spc(idx);
    ws := '';
    result := xe(idx);
    if not result then exit;
    result := txt[idx] = '"';
    if not result then exit;
    inc(idx);
    result := false;
    repeat
      fin := not xe(idx);
      if not fin then
        begin
          if txt[idx] = '\' then
            begin
              inc(idx);
              if not xe(idx) then exit;
              case txt[idx] of
                '\': ws := ws + '\';
                '"': ws := ws + '''';
                '/': ws := ws + '/';
                'b': ws := ws + #8;
                'f': ws := ws + #12;
                'n': ws := ws + #10;
                'r': ws := ws + #13;
                't': ws := ws + #9;
                'u':
                  begin
//                    ws := ws + widechar(strtoint('$' +
//                      copy(txt, idx + 1, 4)));
                    ws := ws + code2utf(strtoint('$' + copy(txt, idx + 1, 4)));
                    idx := idx + 4;
                  end;
              end;
            end
          else if txt[idx] <> '"' then
            begin
              ws := ws + txt[idx];
            end
          else
            begin
              fin := true;
              result := true;
            end;
          inc(idx);
        end;
    until fin;
    if not result then exit;
    js := TlkJSONstring.Create;
    js.FValue := UTF8Decode(ws);
    add_child(o, TlkJSONbase(js));
    ridx := idx;
  end;

  function js_list(idx: Integer; var ridx: Integer; var o:

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
蜜桃91丨九色丨蝌蚪91桃色| 欧美性色黄大片| 精品国产成人在线影院| 五月婷婷综合网| 337p亚洲精品色噜噜噜| 日韩**一区毛片| 久久久精品2019中文字幕之3| 久久黄色级2电影| 日韩午夜av电影| 麻豆成人免费电影| 久久一夜天堂av一区二区三区| 麻豆精品一区二区av白丝在线| 久久亚洲一级片| 久久国内精品自在自线400部| 日韩欧美一级二级| 成人午夜激情视频| 日韩伦理免费电影| 7777精品伊人久久久大香线蕉的| 老司机精品视频线观看86| 国产午夜精品在线观看| 99久久久久久99| 婷婷久久综合九色国产成人| 日韩精品自拍偷拍| 91美女精品福利| 久久精品国产99国产精品| 国产亚洲精品精华液| 欧美亚州韩日在线看免费版国语版| 午夜视频久久久久久| 国产亚洲精品资源在线26u| 在线日韩一区二区| 高清国产一区二区| 日本欧美大码aⅴ在线播放| 国产精品短视频| 精品日韩欧美在线| 欧美精品在欧美一区二区少妇| 欧美日韩国产一级| 国产精品99久久久久久似苏梦涵| 亚洲老司机在线| 中文字幕一区二区三区四区不卡| 91精品国产综合久久福利软件| 91福利国产精品| 成人av小说网| 成人黄色在线网站| 国产成人午夜视频| 韩国女主播一区二区三区| 五月天一区二区| 日韩av电影天堂| 日韩电影网1区2区| 偷拍自拍另类欧美| 日韩精品色哟哟| 免费久久精品视频| 裸体一区二区三区| 经典三级一区二区| 热久久国产精品| 激情综合网av| 粉嫩aⅴ一区二区三区四区| 国产成人超碰人人澡人人澡| 欧美图片一区二区三区| 欧美午夜电影网| 日韩一级视频免费观看在线| 日韩一区二区在线看| 久久久久久久性| 亚洲最大成人综合| 免费精品视频最新在线| 国产精品羞羞答答xxdd| 成人在线综合网| 欧美日韩国产a| 久久久精品中文字幕麻豆发布| 亚洲欧洲无码一区二区三区| 亚洲综合丁香婷婷六月香| 免费成人av资源网| voyeur盗摄精品| 欧美一区二区三区四区视频| 国产亚洲成aⅴ人片在线观看| 亚洲精品免费看| 国产乱人伦精品一区二区在线观看 | 奇米精品一区二区三区四区| 国产精品亚洲专一区二区三区| 99国产精品久| 久久蜜桃一区二区| 日韩成人av影视| 色哦色哦哦色天天综合| 视频一区在线播放| 国产.欧美.日韩| 欧美成人欧美edvon| 丝袜亚洲精品中文字幕一区| 成人激情综合网站| 久久久99精品免费观看不卡| 亚洲成av人在线观看| 色菇凉天天综合网| 国产精品色在线| jlzzjlzz亚洲女人18| 国产精品丝袜黑色高跟| 久久国产夜色精品鲁鲁99| 欧美一区午夜视频在线观看| 一区二区三区在线视频播放| 91免费观看国产| 亚洲一区二区欧美| 欧美日本乱大交xxxxx| 日韩中文字幕一区二区三区| 欧美精三区欧美精三区| 免费视频一区二区| 欧美videossexotv100| 国产在线一区二区综合免费视频| 日韩一区二区三区三四区视频在线观看 | 欧美午夜精品免费| 亚洲成av人片在线观看无码| 欧美日韩一卡二卡三卡| 午夜精品在线视频一区| 欧美精品一区二| 99视频在线精品| 午夜激情综合网| 国产午夜亚洲精品不卡| 91精品在线麻豆| 成人av在线电影| 一区二区三区视频在线看| 欧美高清性hdvideosex| 久99久精品视频免费观看| 中文字幕日韩一区| 欧美精品久久一区二区三区| 国产麻豆视频一区二区| 一区二区三区在线免费播放| 日韩欧美另类在线| 色欲综合视频天天天| 国产精品一二三在| 婷婷开心激情综合| 亚洲乱码中文字幕| 国产91精品欧美| 日一区二区三区| 亚洲嫩草精品久久| 国产亚洲美州欧州综合国| 欧美日韩国产欧美日美国产精品| 国产一区二区在线观看视频| 亚洲成人自拍偷拍| 婷婷六月综合网| 国产人久久人人人人爽| 久久综合九色综合97婷婷女人 | 欧洲亚洲国产日韩| 国产精品中文有码| 国内精品伊人久久久久av影院| 亚洲成a人片在线观看中文| 一区二区三区在线观看欧美| 欧美国产1区2区| 亚洲欧洲www| 亚洲欧美自拍偷拍| 一区二区三区在线观看网站| 中文字幕亚洲电影| 亚洲精品国久久99热| 亚洲一区成人在线| 午夜久久久久久电影| 午夜影视日本亚洲欧洲精品| 日韩中文字幕区一区有砖一区| 天天综合网 天天综合色| 美国一区二区三区在线播放| 久久成人综合网| 粉嫩av亚洲一区二区图片| 色婷婷久久久久swag精品| 欧美日韩一区二区三区免费看| 欧美日韩亚洲综合| 国产日韩一级二级三级| 亚洲免费在线播放| 精品一区二区三区在线观看| 国产91精品一区二区| 欧美群妇大交群的观看方式| 欧美成人女星排行榜| 欧美国产日韩在线观看| 午夜伊人狠狠久久| 夫妻av一区二区| 欧美高清视频一二三区| 久久只精品国产| 亚洲一二三区不卡| 成人avav影音| 精品美女一区二区| 五月综合激情网| 99久久国产免费看| 欧美mv日韩mv亚洲| 香蕉成人伊视频在线观看| 成人黄色在线视频| 久久久久久久久岛国免费| 日韩电影免费在线看| 色丁香久综合在线久综合在线观看| 精品国产乱码久久久久久影片| 一区二区视频免费在线观看| 国产成人精品www牛牛影视| 欧美一二三区精品| 午夜亚洲福利老司机| 91精品国产综合久久精品麻豆| 亚洲色图欧洲色图| 国产成人av自拍| 国产欧美日韩综合| 国产精品自拍av| 26uuu色噜噜精品一区| 精品一区二区免费看| 精品成人佐山爱一区二区| 狠狠色丁香婷综合久久| 欧美tickling挠脚心丨vk| 韩国精品主播一区二区在线观看 | 欧美性一区二区| 午夜国产精品一区| 日韩欧美国产综合在线一区二区三区|