Creating Document from JSON

41 vues
Accéder directement au premier message non lu

John Smith

non lue,
11 août 2022, 06:31:1311/08/2022
à MongoEngine Users
I've got some JSON that uses Camel Case naming for fields which comes from a library. I understand I can use the ** kwargs operator in the Document constructor however I want to use underscore naming for fields in my code. I've written a function in my Document class to deserialise from json and map the correct names. Is there a formal way of doing this?
Thanks
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message