package com.fireworksdk.bridge.models import org.json.JSONObject object FWControlsInsetModelSerializer { private const val TOP = "top" private const val BOTTOM = "bottom" fun serialize(model: FWControlsInsetModel?): JSONObject? { model ?: return null val jsonObject = JSONObject() model.top?.let { jsonObject.put(TOP, it) } model.bottom?.let { jsonObject.put(BOTTOM, it) } return jsonObject } }