I have this
request .get(uri"$configurationEndpoint") .header("Authorization", s"Bearer $token") .send(backend) .flatMap(configurationResponse => { if (configurationResponse.code.equals(StatusCode.Ok)) { decode[Json](configurationResponse.body) match { case Right(value) => updatedJson = value.copy(bulkApi = true)
As you see, what I want to do is take the original json sent except I add a value if it doesn't exist or change it, how can I do this?
I have tried a few things such as the following but it did not work
value.deepMerge(Json.obj("bulkApi" -> bulkApi))