toJson and fromJson on entities updated to dartling 2