--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/20251004184440.EE86.CA28FD01%40gmail.com.
?
Maybe this ?local cJson := '{"err_no":-1,"errmsg":"無法辨識的功能!!","errtil":"錯誤!!(3bc8d2ca-a101-4585-afae-a35d483c0796)"}'
?Nelson
sample prg:
func main()
local hData := {"err_no"=>-1,"errmsg"=>"無法辨識的功能!!","errtil"=>"錯誤!!(3bc8d2ca-a101-4585-afae-a35d483c0796)"}
// local cJson := hb_jsonEncode( hData )? // <--- is ok
local cJson := '{"err_no"=>-1,"errmsg"=>"無法辨識的功能!!","errtil"=>"錯誤!!(3bc8d2ca-a101-4585-afae-a35d483c0796)"}' // is fail!!
local hJson := {=>}, i
? ? ? ? 'json string-1: ',cJson
? ? ? ? ? ? ? ? ? ? ? ? hJson := hb_jsonDecode( cJson )
? ? ? ? ? ? ? ? ? ? ? ? aJson := hb_hKeys(hJson)
? ? ? ? ? ? ? ? ? ? ? ? ? 'json len: ', Len(aJson)
? ? ? ? ? ? ? ? ? ? ? ? FOR i := 1 TO Len(aJson)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? i,':',hb_hKeyAt( hJson, i ), '=>', hb_hValueAt( hJson, i )
? ? ? ? ? ? ? ? ? ? ? ? NEXT i
? ? ? //
? ? ? ? ? ? ? ? ? ? ? ? ? 'json string-2: ',cJson
? ? ? // cJson := hb_StrReplace( cJson, {'\'}, {'\\'} )
? ? ? ? ? ? ? ? ? ? ? ? hJson := hb_jsonDecode( cJson )
? ? ? ? ? ? ? ? ? ? ? ? aJson := hb_hKeys(hJson)
? ? ? ? ? ? ? ? ? ? ? ? ? 'json len: ', Len(aJson)
? ? ? ? ? ? ? ? ? ? ? ? FOR i := 1 TO Len(aJson)
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? i,':',hb_hKeyAt( hJson, i ), '=>', hb_hValueAt( hJson, i )
? ? ? ? ? ? ? ? ? ? ? ? NEXT i
return
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/20251004184440.EE86.CA28FD01%40gmail.com.
--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/CABLaPWQFwRufR96dNL1rxh-76FWCgH%2BOt7KBPTEkR%3Dji_oOOkg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/20251010093927.9242.CA28FD01%40gmail.com.