search

Home  >  Q&A  >  body text

javascript - How to parse an ajax request that returns map<object, object>

阿神阿神2745 days ago855

reply all(1)I'll reply

  • 黄舟

    黄舟2017-06-14 10:53:43

    You are using the ProvincialEntity instance as the key, and your ProvincialEntity class does not have a customized toString() method, so you use the default toString() method and convert it into the form of package name.class name@hash code, This is wrong. You are effectively exposing your background details to the client.
    When parsed by the client:
    {} represents an object context:
    Suppose var x = {a : 'b'}
    x.a ===> 'b'
    or x['a'] ===> 'b'

    reply
    0
  • Cancelreply