Re: Clarify objections to JSON [was Re: Getting the group back on track]

The easiest thing to do without over specifying things is to allow content
objects like Note and Article to have their own mediaType property that
identifies the type of text in the content property. If that's not
provided, default to html which was the AS1 default. Then we let
implementers do what they will. That's similar but not exactly the same as
the approach Atom took with text constructs and it's the simplest thing
that could work here.
On Oct 27, 2015 4:24 PM, "Jason Robinson" <mail@jasonrobinson.me> wrote:

> I think plain text and HTML should be considered as the main types. It
> would be unreasonable IMHO to assume any implementers format all internally
> as plain text stored messages to HTML just to transfer them. This would
> cause all kinds of line breaks issues for example, as commented by Michael
> from Friendica in the public comments list (
> https://lists.w3.org/Archives/Public/public-socialweb-comments/2015Oct/0001.html
> ).
>
> Instead of an "open ended list of formats", maybe allow options text/plain
> and text/html - and encourage falling back to text/plain if contentType is
> not given or is not one of the spec. In this way, implementers *CAN*
> specify text/markdown, which apparently is in process at IETF as the
> official type.
>
> Personally though, I would love to see Markdown as a fully supported
> content type, after all it IS being standardized through CommonMark and IS
> a very, very popular way of formatting text. It is becoming pretty much a
> standard in readme files, highly probably due to GitHub adopting it.
> Including it as a "third" would make parsers life easier. But understand
> that there might not be a use case for including it.
>
> Br,
> Jason
>
> On 27.10.2015 22:31, Owen Shepherd wrote:
>
> I wonder, does AS2 really need to be able to transport messages in
> arbitrary formats?
>
> Given I implement AS2 and want to render a message, what formats am I
> required to support? What am I supposed to do when I receive a message in a
> format I don't support?
>
> AS1 mandated HTML and that seemed to work well - HTML rendering libraries
> are everywhere and generally HTML has a superset of the features that all
> other common formats do. From a perspective of interop, exchanging HTML
> fragments seems ideal.
>
> Requiring support for multiple formats (especially poorly specified in
> general ones like Markdown), or even worse leaving the list of formats a
> client must implement completely open ended, seems like we dooming us to
> make a non-inter-operable format.
>
>
> Owen
>
> On Sun, Oct 25, 2015 at 8:37 PM Jason Robinson <mail@jasonrobinson.me>
> wrote:
>
>>
>>
>> On 25.10.2015 22:10, elf Pavlik wrote:
>> > On 10/25/2015 04:48 PM, Jason Robinson wrote:
>> >> On 25.10.2015 10:11, elf Pavlik wrote:
>> >>> On 10/25/2015 12:09 AM, Jason Robinson wrote:
>> >>>> Hi James,
>> >>>>
>> >>>> Yes, I meant the vocab. For object types, diaspora* currently
>> supports,
>> >>>> from the AS2 vocab, Image, Question, Place, Mention, Profile. Events
>> >>>> support will come at some point. For actual status messages, I'm
>> >>>> hesitant to say which object would be used. Note, Article and Content
>> >>>> seem very similar - and in diaspora* everything is just a status
>> >>>> message, whether short one liner or a 30K char markdown formatted
>> blog
>> >>>> post. I guess Note might still be the right one. Likely incoming
>> parsing
>> >>>> would squash all three as the same. I guess a comment would just be
>> >>>> Content|Note|Article with an "inReplyTo" attribute.
>> >>> You mentioned markdown, I remember that Amy also uses it. Does
>> diaspora
>> >>> send textual content as plain text, makrdown, html or allows
>> specifying
>> >>> syntax used in the content?
>> >> Everything is stored "as is", so markdown is stored as markdown, html
>> >> (the limited tags that are supported) as html. There is only one type
>> of
>> >> status message to choose from and one can format it as one likes.
>> >> Various formats (markdown, html, special stuff like mentions, tags) are
>> >> then rendered to html in the UI.
>> > I guess you must pass every message through markdown rendering and if it
>> > just uses limited html it simply doesn't get affected by that. Otherwise
>> > having no explicit knowledge if someone used markdown, you would need to
>> > try detecting it. Which flavor of markdown Diaspora uses? Maybe
>> > http://commonmark.org/ ?
>> >
>> >
>>
>> Diaspora* uses Markdown-it, a JS library, with some additional plugins.
>> It's fully CommonMark compliant.
>>
>> https://github.com/markdown-it/markdown-it
>>
>> --
>> -----
>> Br,
>> Jason Robinson
>> https://jasonrobinson.me
>>
>>
>>
>>
> --
> -----
> Br,
> Jason Robinsonhttps://jasonrobinson.me
>
>

Received on Tuesday, 27 October 2015 23:41:02 UTC