angularjs - Difference between $httpParamSerializerJQLike and $httpParamSerializer -


i dont understand main difference between $httpparamserializerjqlike , $httpparamserializer , when can use 1 of them.. 1 me.. ?

old question, looking today , found answer somewhere else:

link:

in general, seems $httpparamserializer uses less "traditional" url-encoding format $httpparamserializerjqlike when comes complex data structures.

for example (ignoring percent encoding of brackets):

with array property of data object such {sites:['google', 'facebook']}:

  • $httpparamserializer return sites=google&sites=facebook
  • $httpparamserializerjqlike return sites[]=google&sites[]=facebook

with object property of data object such {address: {city: 'la', country: 'usa'}}:

  • $httpparamserializer return address={"city": "la", country: "usa"}
  • $httpparamserializerjqlike return address[city]=la&address[country]=usa

Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -