skip to Main Content

invalid characters when using json object in gitlab

this is the code that i used in gitlab bash: kubectl --kubeconfig=$KUBECONFIG -n $NAMESPACE_NAME patch service $CI_PROJECT_NAME -p '{"spec": {"selector": {"app.kubernetes.io/instance": "${HELM_NAME}-blue"}}}' But when deploying, the following error is shown: Error from server (BadRequest): invalid character 's' looking for beginning…

VIEW QUESTION

Json – null check is always evaluating to false

import org.json.JSONObject; String someStringJsonData = "{"someKey": " + "null" + "}"; JSONObject someJsonObjectData = new JSONObject(someStringJsonData); Object someKey = someJsonObjectData.get("someKey"); if (null == someKey) { System.out.println("someKey is null"); } I have the above simple snippet of code. I would expect…

VIEW QUESTION
Back To Top
Search