Skip to content

Conversation

Esam-Bustaty
Copy link

Mono doesn't implement the attributes DataContract/DataMember/IgnoreDataMember, so to be able to use them in Unity/Mono i added a define to implement them in SimpleJson namespace, just define ALTERNATE_DATACONTRACT to enable the alternate definition.

Copy link
Member

Choose a reason for hiding this comment

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

all #define prefix should be prefixed with SIMPLE_JSON_. Don't quite like the name alternate too. feel free to give suggestions.

Copy link
Author

Choose a reason for hiding this comment

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

I can think of these possible names:

SIMPLE_JSON_CUSTOM_DATACONTRACT
SIMPLE_JSON_FIX_MISSING_DATACONTRACT
SIMPLE_JSON_REDEFINE_ATTRIBUTES
SIMPLE_JSON_CUSTOM_ATTRIBUTES
SIMPLE_JSON_FIX_MISSING_ATTRIBUTES
SIMPLE_JSON_FIX_MONO_MISSING_ATTRIBUTES
SIMPLE_JSON_NO_WCF
SIMPLE_JSON_FIX_MISSING_DATACONTRACT

Copy link
Member

Choose a reason for hiding this comment

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

SIMPLE_JSON_REDEFINE_DATACONTRACT_ATTRIBUTES or SIMPLE_JSON_EMBED_DATACONTRACT_ATTRIBUTES.

Copy link
Author

Choose a reason for hiding this comment

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

I'll vote for SIMPLE_JSON_REDEFINE_DATACONTRACT_ATTRIBUTES as i think the word "embed" is used when sticking something to the data itself, not classes or attributes, but both are fine.

Copy link
Member

Choose a reason for hiding this comment

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

sure. go for it before I can merge

@Esam-Bustaty
Copy link
Author

Did the rename, it's now SIMPLE_JSON_REDEFINE_DATACONTRACT_ATTRIBUTES.

Copy link
Member

Choose a reason for hiding this comment

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

can you add Unity/Mono

Copy link
Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

Choose a reason for hiding this comment

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

add

#if SIMPLE_JSON_INTERNAL
    internal
#else
    public
#endif

Copy link
Author

Choose a reason for hiding this comment

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

And Done.

@Esam-Bustaty
Copy link
Author

so, is this waiting for something from me? i want to make other pull requests, but as I'm new to github, I wanted to do them one by one, as each one is a separate feature, so if there is something that I can do to accelerate this, I'm happy to do, otherwise, how can I make other pull requests? maybe port again? how these things are usually done?

@prabirshrestha
Copy link
Member

will try merging and releasing this later tonight.

The rule is not to update your master with your patches. This allows you to work on multiple features at the same time. Here is a good workflow from Nancy. https://github.com/NancyFx/Nancy/wiki/Git-Workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants