json-object-mapper icon indicating copy to clipboard operation
json-object-mapper copied to clipboard

deserializeArray returns undefined when called on an empty array

Open jongunter opened this issue 8 years ago • 2 comments
trafficstars

Hi, is this intended behavior?

  class Example {
      hello = null;
      world = null;
    }
    const helloJson = []
    const result = ObjectMapper.deserializeArray(Order, helloJson);

    // expected []
    // was undefined
    console.log(result);

If not, it should be fixed. If so, it should be documented, as it seems like it could cause confusion.

jongunter avatar Jun 22 '17 20:06 jongunter

@jongunter see pull request #19

devpreview avatar Jul 23 '17 10:07 devpreview

Can you please try 1.5.0?

shakilsiraj avatar Jul 30 '17 12:07 shakilsiraj