ranjithkumar10

custom json

Sep 30th, 2016
1,963
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.45 KB | None | 0 0
  1. Public Sub customjson()
  2. Dim mainContainer As New Dictionary, priceArray As New Collection, priceContainer As New Dictionary
  3. mainContainer("id") = "001"
  4. mainContainer("name") = "mark"
  5. mainContainer("minCount") = "10000"
  6. priceContainer("name") = "product"
  7. priceContainer("value") = "100"
  8. priceContainer("key") = "pr21"
  9. priceArray.Add priceContainer
  10. mainContainer.Add "price", priceArray
  11. Debug.Print ConvertToJson(mainContainer, Whitespace:=2)
  12. End Sub
Add Comment
Please, Sign In to add comment