Domande taggate «jsonpath»

5
contare i membri con jsonpath?
È possibile contare il numero di membri utilizzando JsonPath? Utilizzando spring mvc test sto testando un controller che genera {"foo": "oof", "bar": "rab"} con standaloneSetup(new FooController(fooService)).build() .perform(get("/something").accept(MediaType.APPLICATION_JSON)).andExpect(status().isOk()) .andExpect(jsonPath("$.foo").value("oof")) .andExpect(jsonPath("$.bar").value("rab")); Vorrei assicurarmi che nessun altro membro sia presente nel json generato. Si spera contandoli usando jsonPath. È possibile? Sono benvenute anche …
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.