import net.minidev.json.JSONStyle;
public class ModelEncoder {
public static void encodeModel(Map<String,Object> model, Writer writer) throws IOException {
final JSONStyle style = new JSONStyle() {
@Override
public boolean mustProtectKey(String s) {
return s.isEmpty() || s.indexOf('-') >= 0 || s.indexOf('.') >= 0;
}
};