Giter Site home page Giter Site logo

Get notified if a key is missing about arrow HOT 3 CLOSED

freshos avatar freshos commented on May 22, 2024
Get notified if a key is missing

from arrow.

Comments (3)

maxkonovalov avatar maxkonovalov commented on May 22, 2024 2

@s4cha how about making the deserialize func throwing?

from arrow.

s4cha avatar s4cha commented on May 22, 2024

@maxkonovalov , good question :)

Arrow didn't have error handling (on purpose) but this is something we can discuss. Having given this some time I think it might not be worth it. I personally never had the need to test errors in JSON parsing as I believe that this is an Api-side problem.

On the iOS side, Unit tests test against local JSON files to make sure parsing works as expected.
On the backed side, unit tests test that the api sends the correct JSON structures.

Could you elaborate on a concrete case where we need to catch parsing errors?

from arrow.

maxkonovalov avatar maxkonovalov commented on May 22, 2024

@s4cha agreed, I don't have such use cases either. For me it works perfect just to do nothing if the key is not there or could not be parsed. Other frameworks usually provide a way to specify a fallback value for that case.

from arrow.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.