The json you want to send should have two properties: masterTrackingNumberInfoObj and associatedType. But you're embedding associatedType in masterTrackingNumberInfoObj instead of embedding it to json, the fix is simple:
Code:
Dim json As Object
Set json = CreateObject("scripting.dictionary")
' array of "address" containers
Dim masterTrackingNumberInfoObj As Object
Set masterTrackingNumberInfoObj = CreateObject("scripting.dictionary")
' the "TrackingNumberInfoObj" container object that holds the "trackingNumber" element
Dim TrackingNumberInfoObj As Object
Set TrackingNumberInfoObj = CreateObject("scripting.dictionary")
TrackingNumberInfoObj.Add "trackingNumber", "123456789012"
Set masterTrackingNumberInfoObj("TrackingNumberInfo") = TrackingNumberInfoObj
Set json("masterTrackingNumberInfo") = masterTrackingNumberInfoObj
' masterTrackingNumberInfoObj.Add "associatedType", "STANDARD_MPS" <--- here's the problem
json.Add "associatedType", "STANDARD_MPS"
Dim postData As String
postData = JsonConverter.ConvertToJson(json)
As for how to analyze these things, I suggest you to format your json. In JSON, values can be strings, numbers, booleans, objects or collections. Therefore, if you see [], that's a collection as value. If you see {}, that's an object as value, if you don't see either, then it's just a value. In the case of your example, you can break it down like this:
Code:
{ <--- object 0 json base object
"masterTrackingNumberInfo": { <--- object 1 masterTrackingNumberInfoObj object as value for object 0
"trackingNumberInfo": { <--- object 2 trackingNumberInfoObj object as value for object 1
"trackingNumber": "123456789012" <--- string as value for object 2
} <--- /object 2
}, <--- /object 1
"associatedType": "STANDARD_MPS" <--- string value for object 0
} <--- /object 0
Basically, define your objects first, then, when you see a value that's neither an object or collection, use your defined objects and assign the values as necessary.