My REST service returns json like this:
{"lastWriteTime":1525507872.123000000 .... }
how do I match it in my mockMvc test using jsonPath
statement?
when I try to use an is or equalTo matcher, like this:
andExpect(jsonPath("$.elements[0].lastWriteTime", equalTo(1525507872.123000000)))
I keep getting this kind of error in different flavours:
java.lang.AssertionError: JSON path "$.elements[0].lastWriteTime"
Expected: <1.525507872123E9>
but: was <1525507872.123000000>
casting the value to double or specifying as string doesn't seem to work.