title: How can I convert a JSON string to URL parameters (GET request)?
body: <p>I have the following JSON which has to be converted to URL parameters for a GET request. </p>
  
  <p>An <a href="https://developers.sageone.com/docs#generate_your_signature_base_string" rel="nofollow noreferrer">example is given here</a>, however due to the complexity of this object, there can be multiple <code>line_items_attributes</code> each with the given values as shown, I'm having difficulties passing on the correct one. </p>
  
  <p>I've also tried to just serialize the JSON object and pass on that value but that did not solve the issue either.</p>
  
  <pre><code>{
      "purchase_invoice":
      {
          "date":"14/04/2015",
          "due_date":"14/04/2015",
          "contact_id":500,
          "contact_name":"TestContact",
          "reference":"TestReference",
          "line_items_attributes":[
              {
                  "unit_price":10.00,
                  "quantity":1,
                  "description":"TestLineItemAttDesc",
                  "tax_code_id":1,
                  "ledger_account_id":501,
                  "tax_rate_percentage":19.0,
                  "tax_amount":1.60
  
              }]
      }
  }
  </code></pre>
  
  <p>I've been searching for a while now but without much luck. Any insights are appreciated and most welcome!</p>
  
  <p>This is calling an API which does not support the incoming data in JSON format, so doing this server-side or changing the web service to support data in JSON format is not possible.</p>