Why Nostr? What is Njump?
2023-06-07 02:44:45
in reply to

Jordan Mack [ARCHIVE] on Nostr: šŸ“… Original date posted:2011-12-19 šŸ—’ļø Summary of this message: HTTP multipart ...

šŸ“… Original date posted:2011-12-19
šŸ—’ļø Summary of this message: HTTP multipart response is not simple to parse and lacks library support. JSON is widely adopted, human-readable, and has parsing libraries available for every major language. Using HTTP for data interchange will make things difficult for developers.
šŸ“ Original message:With all due respect, I continue to disagree on the topic of using HTTP
for data interchange.

Yes, an HTTP multipart response will accomplish the need for multiple
named resources. The problem is that parsing of a multipart response
isn't simple, and library support is weak across many languages. The
widely adopted cURL library does not support multipart response parsing
at all.

JSON is widely adopted, human readable, and has parsing libraries
available for every major language. There is a bit of additional bloat,
but I believe it is warranted in this case because of the convenience
and ease it brings to developers.

If the idea is to "KISS", and provide a method that is both quick and
easy to implement for the average developer, then JSON is a stand out
option. Using HTTP for the data interchange will make things difficult
for a lot of developers if multipart responses are used. JSON will be
greeted with open arms.



On 12/19/2011 9:09 AM, slush wrote:
> I agree with Luke that HTTP standard has everything necessary and
> bloating payload with json/xml is not necessary.
>
> Btw that argument "we have json in client already" seems pretty wrong,
> because json in server rpc solves another problem (and solve it in wrong
> way, because of data type issues, but it's another story).
Author Public Key
npub18yq2ukhtlnkuzzykluyjvxap3vtvdqf0arvtag6rx02klk6gymgqp3txp2