Why should a REST service support multiple formats (e.g. XML and JSON)? -


several sources (e.g. here) suggest rest service should support several formats.

what benefits of approach?

wouldn't make service more complicated , harder support while providing no additional benefits customer?

my point of view hope not necessary. if have given both, giving flexibility customer use either xml or json.

i prefer using json hence more compact , readable - in communication "faster" because less data transferred xml. if use xml, customer can use xslt, xpath things. both has pros , cons.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -