1

I'm struggling to use the Add method for Json Patch Document in vb.net? My goal is to create work items programmatically. I'm looking to add values to Title, Description and Priority field of a work item. Do I have to use the same code separately for all three fields?

Also, I'm new to all this development stuff so encouragement would be appreciated. Here is my mini code - just updated. Can anyone tell me if I'm doing it the right way.

       Dim JPDocument As New JsonPatchDocument

    With JPDocument

        .Item(0).Operation = Operation.Add
        .Item(0).Path = "/fields/System.Title"
        .Item(0).Value = "Visual basic rocks"
    End With

Thanks, Omar

Dev-Ops
  • 11
  • 2
  • You may want to tag your question with `json-patch`. That will attract people who know what you are talking about. You probably should remove the `C#` tag since your question has nothing to do with C#. You are also more likely to get answers if you give it a try, put some code down, show your code (as text) and describe the problems you are having – Flydog57 Mar 29 '21 at 22:28
  • Sure thanks. This is very helpful. Also which language would you prefer. Reason I'm using vb.net is I the past when it was just visual basic. – Dev-Ops Mar 29 '21 at 23:22
  • @Flydog57 Can you provide some insight please? – Dev-Ops Mar 30 '21 at 03:38
  • Sorry, never used JsonPatch. I was curious what it was, so I clicked your question. My comments were intended to help you improve your question (it's much better now) not to signal my expertise – Flydog57 Mar 30 '21 at 11:52

0 Answers0