Git Product home page Git Product logo

Comments (3)

RamblinWreck77 avatar RamblinWreck77 commented on August 22, 2024

I use .convertFromSnakeCase and a custom date formatter for my api. Most APIs I've interacted with use snake case and that's not the swift convention. (Using Codable means your object's elements have to have the same names as the JSON keys).

Just so I understand, currently ZippyJSON would fallback to apple's decoder in my use case?

from zippyjson.

michaeleisel avatar michaeleisel commented on August 22, 2024

.convertFromSnakeCase will not force the use of Apple's decoder. For your case, it will use ZippyJSON's, and the decoding will be about 10x faster overall. If it didn't, you would see a warning message in Xcode's console. Custom date formatters are fine, just not custom key decoding strategies. Although since you mentioned it, I'm curious, what's the dateFormat for your formatter? Could you use the .iso8601 date formatting option? It makes date parsing 10x faster.

from zippyjson.

michaeleisel avatar michaeleisel commented on August 22, 2024

There has not been many people requesting this, so closing for now. In the future we can explore it again. I could also be convinced to have an optional function pointer like void convertKey(char *string, int length), that converts the key in-place, probably in C

from zippyjson.

Related Issues (20)

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.