title: comparing Json result from a function in robot Framework
body: <p>Trying to create a test case in robot framework . </p>
  
  <p>We have couple of rest apis which returns us Json as result . To invoke such a case, we used the following code in rest2.py</p>
  
  <pre><code>def restJSON():
      r = requests.get("http://httpbin.org/get")
  #    print "Code" , r.status_code
  #    print "Text " , r.text
      return r.json()
  </code></pre>
  
  <p>We stored the json inside a file output. And we have written robot test case to evaluate json comparison as below </p>
  
  <pre><code>*** Settings ***
   Library   rest2.py
   Library   OperatingSystem
  *** Test Cases ***
   Example that calls a python keyword
    ${result}=   restJSON
    ${json}=   Get file   output
    Should be equal   ${result}   ${json}
  </code></pre>
  
  <p>But when we run the pybot test case we are getting error saying both json are not same. </p>
  
  <pre><code>--------------------------------
  pybot testSuite.txt
  --------------------------------
  ==============================================================================
  testSuite
  ==============================================================================
  Example that calls a python keyword                                   | FAIL |
  {u'origin': u'10.252.30.94, 69.241.25.16', u'headers': {u'Via': u'1.1 localhost (squid/3.1.14)', u'Accept-Encoding': u'gzip, deflate, compress', u'Accept': u'*/*', u'User-Agent': u'python-requests/2.2.1 CPython/2.7.6 Linux/3.16.0-30-generic', u'Host': u'httpbin.org', u'Cache-Control': u'max-age=259200'}, u'args': {}, u'url': u'http://httpbin.org/get'} != {u'origin': u'10.252.30.94, 69.241.25.16', u'headers': {u'Via': u'1.1 localhost (squid/3.1.14)', u'Accept-Encoding': u'gzip, deflate, compress', u'Accept': u'*/*', u'User-Agent': u'python-requests/2.2.1 CPython/2.7.6 Linux/3.16.0-30-generic', u'Host': u'httpbin.org', u'Cache-Control': u'max-age=259200'}, u'args': {}, u'url': u'http://httpbin.org/get'}
  ------------------------------------------------------------------------------
  testSuite                                                             | FAIL |
  1 critical test, 0 passed, 1 failed
  1 test total, 0 passed, 1 failed
  ==============================================================================
  </code></pre>
  
  <p>The json file are same. But still its Failing test case saying both aren't same. Is this the correct way to compare , or do we have any other method to do it in robot framework. </p>