1. 06 7月, 2016 1 次提交
  2. 07 6月, 2016 1 次提交
  3. 16 2月, 2016 1 次提交
  4. 26 11月, 2015 1 次提交
  5. 22 6月, 2015 1 次提交
  6. 11 5月, 2015 1 次提交
    • E
      json-parser: Accept 'null' in QMP · e549e716
      Eric Blake 提交于
      We document that in QMP, the client may send any json-value
      for the optional "id" key, and then return that same value
      on reply (both success and failures, insofar as the failure
      happened after parsing the id).  [Note that the output may
      not be identical to the input, as whitespace may change and
      since we may reorder keys within a json-object, but that this
      still constitutes the same json-value].  However, we were not
      handling the JSON literal null, which counts as a json-value
      per RFC 7159.
      
      Also, down the road, given the QAPI schema of {'*foo':'str'} or
      {'*foo':'ComplexType'}, we could decide to allow the QMP client
      to pass { "foo":null } instead of the current representation of
      { } where omitting the key is the only way to get at the default
      NULL value.  Such a change might be useful for argument
      introspection (if a type in older qemu lacks 'foo' altogether,
      then an explicit "foo":null probe will force an easily
      distinguished error message for whether the optional "foo" key
      is even understood in newer qemu).  And if we add default values
      to optional arguments, allowing an explicit null would be
      required for getting a NULL value associated with an optional
      string that has a non-null default.  But all that can come at a
      later day.
      
      The 'check-unit' testsuite is enhanced to test that parsing
      produces the same object as explicitly requesting a reference
      to the special qnull object.  In addition, I tested with:
      
      $ ./x86_64-softmmu/qemu-system-x86_64 -qmp stdio -nodefaults
      {"QMP": {"version": {"qemu": {"micro": 91, "minor": 2, "major": 2}, "package": ""}, "capabilities": []}}
      {"execute":"qmp_capabilities","id":null}
      {"return": {}, "id": null}
      {"id":{"a":null,"b":[1,null]},"execute":"quit"}
      {"return": {}, "id": {"a": null, "b": [1, null]}}
      {"timestamp": {"seconds": 1427742379, "microseconds": 423128}, "event": "SHUTDOWN"}
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      e549e716
  7. 23 6月, 2014 1 次提交
  8. 14 4月, 2013 3 次提交
  9. 22 2月, 2013 1 次提交
  10. 19 12月, 2012 1 次提交
  11. 17 8月, 2012 1 次提交
  12. 30 3月, 2012 1 次提交
  13. 13 1月, 2012 2 次提交
  14. 06 9月, 2011 1 次提交
  15. 22 10月, 2010 1 次提交
  16. 14 6月, 2010 1 次提交
  17. 12 6月, 2010 2 次提交
  18. 17 11月, 2009 2 次提交