func Test_jsonparser_abnormal_unpaired_brackets(t *testing.T) {
	var testEg string = "{ \"Name\": \"opencensus.io/measure/Temperature\" , \"Tags\" : { \"ArduinoId\" : \"Arduino-1\" , \"Date\" : \"2018-07-02\"  } , \"Value\":\"23.72\" }}"
	_, err := jsonParser.DecodeMeasurement([]byte(testEg))
	if err == nil {
		t.Error("There is one more bracket in the end of input string")
	}
}
Test Example with unpaired brackets in the end of input string
{ "Name": "opencensus.io/measure/Temperature" , "Tags":{"ArduinoId" : "Arduino-1" , "Date" : "2018-07-02"  } , "Value":"23.72" }}
package test
import (
	"testing"
	parser2 "github.com/census-ecosystem/opencensus-experiments/go/iot/protocol/parser"
)
var jsonParser parser2.JsonParser
func Test_jsonparser_normal(t *testing.T) {
	var testEg string = "{\"Name\":\"opencensus.io/measure/Temperature\",\"Value\":\"23.72\",\"Tags\":{\"ArduinoId\":\"Arduino-1\",\"Date\":\"2018-07-02\"}}"
	result, err := jsonParser.DecodeMeasurement([]byte(testEg))
	if err != nil {
		t.Error(err)
	} else {
		if result.Name != "opencensus.io/measure/Temperature" {
			t.Error("Name of parse result is wrong as ", result.Name, " Correct answer is opencensus.io/measure/Temperature")
		}
		if result.Value != "23.72" {
			t.Error("Value of parse result is wrong as ", result.Value, " Correct answer is 23.72")
		}
		if result.Tags["ArduinoId"] != "Arduino-1" {
			t.Error("Tags ArduinoId of parse result is wrong as ", result.Tags["ArduinoId"], " Correct answer is Arduino-1")
		}
		if result.Tags["Date"] != "2018-07-02" {
			t.Error("Tags ArduinoId of parse result is wrong as ", result.Tags["Date"], " Correct answer is 2018-07-02")
		}
	}
}
func Test_jsonparser_normal_with_space(t *testing.T) {
	var testEg string = "{ \"Name\": \"opencensus.io/measure/Temperature\" , \"Value\":\"23.72\" , \"Tags\" : { \"ArduinoId\" : \"Arduino-1\" , \"Date\" : \"2018-07-02\"  } }"
	result, err := jsonParser.DecodeMeasurement([]byte(testEg))
	if err != nil {
		t.Error(err)
	} else {
		if result.Name != "opencensus.io/measure/Temperature" {
			t.Error("Name of parse result is wrong as ", result.Name, " Correct answer is opencensus.io/measure/Temperature")
		}
		if result.Value != "23.72" {
			t.Error("Value of parse result is wrong as ", result.Value, " Correct answer is 23.72")
		}
		if result.Tags["ArduinoId"] != "Arduino-1" {
			t.Error("Tags ArduinoId of parse result is wrong as ", result.Tags["ArduinoId"], " Correct answer is Arduino-1")
		}
		if result.Tags["Date"] != "2018-07-02" {
			t.Error("Tags ArduinoId of parse result is wrong as ", result.Tags["Date"], " Correct answer is 2018-07-02")
		}
	}
}
func Test_jsonparser_normal_unordered(t *testing.T) {
	var testEg string = "{ \"Name\": \"opencensus.io/measure/Temperature\" , \"Tags\" : { \"ArduinoId\" : \"Arduino-1\" , \"Date\" : \"2018-07-02\"  } , \"Value\":\"23.72\" }"
	result, err := jsonParser.DecodeMeasurement([]byte(testEg))
	if err != nil {
		t.Error(err)
	} else {
		if result.Name != "opencensus.io/measure/Temperature" {
			t.Error("Name of parse result is wrong as ", result.Name, " Correct answer is opencensus.io/measure/Temperature")
		}
		if result.Value != "23.72" {
			t.Error("Value of parse result is wrong as ", result.Value, " Correct answer is 23.72")
		}
		if result.Tags["ArduinoId"] != "Arduino-1" {
			t.Error("Tags ArduinoId of parse result is wrong as ", result.Tags["ArduinoId"], " Correct answer is Arduino-1")
		}
		if result.Tags["Date"] != "2018-07-02" {
			t.Error("Tags ArduinoId of parse result is wrong as ", result.Tags["Date"], " Correct answer is 2018-07-02")
		}
	}
}