putOpt will be useful for adding optional key-value pairs without needing explicit null checks. putOnce will be useful when you want to ensure a key is added only once to the JSONObject.