Home > Software engineering >  VB to access the json data, how to adjust the specified field type from the long string
VB to access the json data, how to adjust the specified field type from the long string

Time:11-11

The Public Function JSONParse (ByVal JSONPath As String, ByVal JSONString As String) As the Variant
Dim JSON As Object


Set the JSON=CreateObject (" MSScriptControl. ScriptControl)
JSON. Language="JScript"

JSONParse=JSON. Eval (" JSON="& amp; JSONString & amp; "; JSON. "& amp; JSONPath & amp; ";" )


Set the JSON=Nothing
End the Function


Return results:
? JSONParse
1.16659428734586 e+18
Because the interface definition of long, the field is 19 for Numbers, are automatic conversion,
Is there a simple way to deal with the


Text3. Text=JSONParse (" data. The result of [' "& amp; xx & amp;" ']. UserId ", DataS)

CodePudding user response:

QQ: 527524938, let me try
  •  Tags:  
  • API
  • Related