Browse Source

jansson: Fix reverse logic for JSON boolean

(cherry picked from commit 0125c1c8d8c1179670def9dc4b3e66d6a8e58360)
(cherry picked from commit 26cfea05082fbd2c4236510397986ace2b495b0f)
Alex Hermann 7 years ago
parent
commit
5da494161a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/jansson/jansson_utils.c

+ 1 - 1
src/modules/jansson/jansson_utils.c

@@ -45,7 +45,7 @@ int jansson_to_val(pv_value_t* val, char** freeme, json_t* v) {
 		val->rs.len = strlen(value);
 		val->flags = PV_VAL_STR;
 	}else if(json_is_boolean(v)) {
-		val->ri = json_is_true(v) ? 0 : 1;
+		val->ri = json_is_true(v) ? 1 : 0;
 		val->flags = PV_TYPE_INT|PV_VAL_INT;
 	}else if(json_is_real(v)) {
 		char* value = NULL;