On Fri, 1 Dec 2017 17:40:49 +0100, Jacob Carlborg wrote:
On 2017-11-30 21:12, Matt R wrote:
I've look through the API docs, but haven't been able to find a good answer. I love that Vibe.d is capable of automatically converting between JSON and models, but is there a way to provide alternative key mappings? Maybe something like the new Codable/CodingKeys protocol in Swift 4 (http://benscheirman.com/2017/06/ultimate-guide-to-json-parsing-with-swift-4/). I'm evaluating Vibe.d for use in a small/medium internal company project, but I may need to interface with some pre-existing code that uses JSON key names that are different from what i'd like to use as a code style / conventions.
If there isn't a built in solution, would it be feasable/desirable for me to try and create one as either a add-on or pull request?
The keys can be overridden using the @name UDA .
 http://vibed.org/api/vibe.data.serialization/ number 12
Not sure how I missed that, thanks for the link!