toJSON support

@corinnekrych added toJSON support plus tests and refactored our existing model for clarity 

let me know what u think
Looking at those example where the mapping is straightforward, I wonder if there could be a way to have a default class implementing  JSONSerializable protocol that provides this default mapping by default. Therefore the only thing left to do by the user will be to make its model object inherits from it...