thanks for the info.
i was hoping for a more elaborate solution than what i ended up with, but for my needs it works just fine. i gave up on coercion, and use a variant for everything.
i use the script control to evaluate the json expression everytime it is needed. not the fastest way to do things, but very reliable and simple.
if my project gets more complex, i will be sure to check out the property bag...Code:Public Function Eval(code As String, Optional prop As String) As Variant Dim x As Variant Dim Script2 As New ScriptControl Script2.Language = "JScript" x = (Script2.Eval(code & "['" & prop & "'] ")) Eval = CStr(x) End Function 'example: msgbox Eval( "({a:1,b:2,c:3})", "a") 'displays "1"
thanks again!




Reply With Quote