tests - from/to json