Comments (4)
The next version which is about to be released this weekend will provide a much better way to do the serialization things. You can see a preview in the demo code at the commit tag #133bfd. Any advice is appreciated.
By then, you can customize a transformer to serialize the Enum property and get the string you want.
from handyjson.
The time I designed the original serialization method I try to accomplish that every object can serialize to string naturally, which means no protocol has to conform to, no transformer has to implement, etc.
But now it proof that no constraint lead to much restriction especially when dealing with Enum and Customization. So I refactor the implementation, and make use of the transformer in ObjectMapper.
from handyjson.
The 1.5.0 version has been released. Serialization is well supported now. See the README and the codes. Any question or advice, let me know. :)
from handyjson.
Ok thank you for your time and shares,
i will have some other questions because
i had problem while receiving html content in a deserialized property
but i will put this story in another issue soon if 1.5.2 is not resolving it ;-)
from handyjson.
Related Issues (20)
- My suggestion: Use Codable instead it HOT 16
- SIGILL ILL_ILLTRP crash
- Referencing static method 'deserialize(from:designatedPath:)' on 'Array' requires that 'String' conform to 'HandyJSON'
- Cocoapods Error for 'Not found file'
- 生成的xcframework无法使用 HOT 2
- HandyJSON还能继续使用吗? HOT 4
- 在配合使用Realm的时候,无法转换Realm中List类型数据 HOT 2
- 现在支持 SPM 吗 HOT 1
- UIViewController.deserialize(from: [:]) crash
- 为啥toJSON方法转字典后,并不是自己创建的属性名 HOT 5
- 建议在README中显著标注「不建议使用」 HOT 2
- importing xcframework has problem with bazel
- 继承导致的crash HOT 1
- nil
- Not work with RealmSwift.xcframework HOT 1
- Unable to determine Swift version for the following pods
- 怎么和CoreData结合使用,直接把JSON数据转换为新的CoreData Entity,或更新原有的Entity? HOT 1
- @propertyWrapper
- Calling the toJSONString method with UIColor.clear will result in an error
- 可以自动下划线转驼峰么? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from handyjson.