Skip to content

RFC for serialization#17

Closed
danielgtaylor wants to merge 1 commit intomasterfrom
daniel/serialization
Closed

RFC for serialization#17
danielgtaylor wants to merge 1 commit intomasterfrom
daniel/serialization

Conversation

@danielgtaylor
Copy link
Contributor

The goal of this RFC is to formalize and document the various serialization formats used by Refract, as well as explicitly list how to handle ambiguity in refracted metadata and attributes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of thoughts on these examples.

The full version is simply refracting the element as a normal object. I believe we would do this anyway within Minim, and would treat it as a normal Object Element.

Regarding the compact example, I don't believe this is a valid array element. I believe it would have to be:

['array', {}, {}, [
  ['string', {}, {}, 'foo'],
  ['object', {}, {}, []],
  ['object', {}, {}, []],
  ['number', {}, {}, 0]
]]

We would still do this in any situations where Compact Refract was not expected I believe.

So I actually believe, without any domain-specific knowledge, we will actually already do as you've defined. The difficulty is knowing where that domain-specific knowledge is in the tree.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to also explore how we could tell the parse that these are actual elements. We've talked about a few options here, but just wanted to make this comment. :)

@smizell
Copy link
Contributor

smizell commented Nov 25, 2015

@danielgtaylor I've added some thoughts.

I'd also like to think about this comment where we use your work on the compact version and the RFC for the embedded and create separate repositories for each. We would then remove the compact version from the base Refract spec.

smizell added a commit to refractproject/refract-spec that referenced this pull request Nov 25, 2015
Move compact to its own repo:
refractproject/rfcs#17

Remove namespacing: refractproject/rfcs#22
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which serialization formats are these ambiguous in?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielgtaylor Will this be resolved with this?

#29

If so, would you care to update this RFC accordingly?

@smizell
Copy link
Contributor

smizell commented Dec 15, 2015

How do you all feel about pulling the compact version out of the base spec? I'm not proposing we get rid of it, but I'm wondering if people need to implement it in order to fulfill the base Refract spec. Thoughts?

Compact Refract is only mentioned in passing in the spec, and is not explained in detail (like this RFC aims to do).

@zdne
Copy link
Member

zdne commented Dec 18, 2015

How do you all feel about pulling the compact version out of the base spec? I'm not proposing we get rid of it, but I'm wondering if people need to implement it in order to fulfill the base Refract spec. Thoughts?

Let's remove it from there

@smizell
Copy link
Contributor

smizell commented Jan 14, 2016

See refractproject/refract-spec#53 for moving Compact Refract

@smizell smizell changed the title Add serialization RFC RFC for serialization Jan 15, 2016
@kylef kylef mentioned this pull request Mar 27, 2017
@pksunkara pksunkara closed this Mar 28, 2017
@pksunkara pksunkara deleted the daniel/serialization branch April 11, 2017 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants