Closed yg-h closed 11 months ago
Setting JSON.false and JSON.true to objects prevents Boolean types from being converted to numeric values.
This is an example. https://github.com/thqby/ahk2_lib/blob/master/JSON.ahk#L10 https://www.autohotkey.com/boards/viewtopic.php?p=491511#p491511
I see, thanks. I've changed the initializer to this and the problem is solved
Native.LoadModule('Lib\ahk-json\' (A_PtrSize * 8) 'bit\ahk-json.dll', ['JSON'])
this.DefineProp('true', { value: ComValue(0xB, 1) })
this.DefineProp('false', { value: ComValue(0xB, 0) })
this.DefineProp('null', { value: ComValue(1, 0) })
When calling Chrome().GetPage().Evaluate(...), error is thrown about failing to deserialize parameter
awaitPromise
. The reason is that the json string sent in Call(..) has awaitPromise set as 0 rather than false.Had to modify the code to this as a temporary expedient: