Re: [Dev] Deciding a file type for Json Schema
Hi All, I also think that it is not required to introduce a new extension for json schema files. The common method to differentiate JSON files from JSON Schema files is the "$schema" field in the json. Eg: { "$schema": "http://json-schema.org/draft-04/schema#";, "id": "http://jsonschema.net";, "title" : "employees", "type": "object", . } Thanks, Nuwan On Sat, Mar 19, 2016 at 3:13 PM, Viraj Rajaguru wrote: > Hi all, > > We can define an extension for JSON schema for our reference. But we > shouldn't restrict users from importing JSON schema files which has an > extension other than "*.jschema". Since we are claiming that "WSO2 Data > mapper" supports JSON schema, we should support JSON schema irrespective of > the extension. Reason is there is no official extension defined for JSON > schema and there are some other commonly using extensions(Eg: *.json etc.) > for JSON schema. > > From the implementation perspective, we can change the name "JSCHEMA" from > the drop down list of "Open Input Schema" dialog to "JSON Schema" and allow > user to import JSON schema irrespective of the extension. Since we are > building the tree using the provided JSON schema pro-grammatically, we can > validate the schema and provide an error to user if it's not a JSON schema. > So no need to consider the extension while the importing. > > [image: Inline image 1] > > Thanks, > Viraj. > > On Thu, Mar 10, 2016 at 3:04 PM, Awanthika Senarath > wrote: > >> >> >> .jsc is commonly used for javascript configuration files [1] and .jsd is >> also in use according to [2], therefore IMO it is not suitable to use it >> for our purpose as it may introduce conflicts. >> >> [1] http://www.file-extensions.org/jsc-file-extension >> [2] http://filext.com/file-extension/JSD >> >> Regards >> Awanthika >> >> Awanthika Senarath >> Software Engineer, WSO2 Inc. >> Mobile: +94717681791 >> >> >> >> On Thu, Mar 10, 2016 at 2:48 PM, Susinda Perera wrote: >> >>> >>> >>> On Thu, Mar 10, 2016 at 2:41 PM, Sohani Weerasinghe >>> wrote: >>> How about using something like .jsc ? When we were using avro schema we have used .avsc as the extension hence shall we use .jsc ? Thanks, Sohani Sohani Weerasinghe Software Engineer WSO2, Inc: http://wso2.com Mobile : +94 716439774 Blog :http://christinetechtips.blogspot.com/ Twitter : https://twitter.com/sohanichristine On Thu, Mar 10, 2016 at 2:38 PM, Awanthika Senarath >>> > wrote: > Hi, > > In migrating the Data mapper tool for ESB we need to $subject in order > to differentiate between json schema and json files on loading from file > system and registry. > How about introducing mediatype (if not available) from the registry. >>> and file extension something like (.jsd similar to .xsd). >>> > according to [1] the official mime type for json schema is " > application/schema+json" and we can go ahead with that as the media > type for json schema registry resources. > > For local file system files we can use .jschema to identify > json-schema files. > > WDYT? > > > [1] > http://stackoverflow.com/questions/9391370/json-schema-file-extension > > Regards > Awanthika Senarath > Software Engineer, WSO2 Inc. > Mobile: +94717681791 > > > >>> >>> >>> -- >>> *Susinda Perera* >>> Software Engineer >>> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL) >>> Mobile:(+94)716049075 >>> Blog: susinda.blogspot.com >>> WSO2 Inc. http://wso2.com/ >>> Tel : 94 11 214 5345 Fax :94 11 2145300 >>> >>> >> >> ___ >> Dev mailing list >> Dev@wso2.org >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Viraj Rajaguru > Senior Software Engineer > WSO2 Inc. : http://wso2.com > > Mobile: +94 77 3683068 > > > > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- -- *Nuwan Chamara Pallewela* *Software Engineer* *WSO2, Inc. *http://wso2.com *lean . enterprise . middleware* Email *nuw...@wso2.com * Mobile *+94719079739@* ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Deciding a file type for Json Schema
Hi all, We can define an extension for JSON schema for our reference. But we shouldn't restrict users from importing JSON schema files which has an extension other than "*.jschema". Since we are claiming that "WSO2 Data mapper" supports JSON schema, we should support JSON schema irrespective of the extension. Reason is there is no official extension defined for JSON schema and there are some other commonly using extensions(Eg: *.json etc.) for JSON schema. >From the implementation perspective, we can change the name "JSCHEMA" from the drop down list of "Open Input Schema" dialog to "JSON Schema" and allow user to import JSON schema irrespective of the extension. Since we are building the tree using the provided JSON schema pro-grammatically, we can validate the schema and provide an error to user if it's not a JSON schema. So no need to consider the extension while the importing. [image: Inline image 1] Thanks, Viraj. On Thu, Mar 10, 2016 at 3:04 PM, Awanthika Senarath wrote: > > > .jsc is commonly used for javascript configuration files [1] and .jsd is > also in use according to [2], therefore IMO it is not suitable to use it > for our purpose as it may introduce conflicts. > > [1] http://www.file-extensions.org/jsc-file-extension > [2] http://filext.com/file-extension/JSD > > Regards > Awanthika > > Awanthika Senarath > Software Engineer, WSO2 Inc. > Mobile: +94717681791 > > > > On Thu, Mar 10, 2016 at 2:48 PM, Susinda Perera wrote: > >> >> >> On Thu, Mar 10, 2016 at 2:41 PM, Sohani Weerasinghe >> wrote: >> >>> How about using something like .jsc ? >>> >>> When we were using avro schema we have used .avsc as the extension hence >>> shall we use .jsc ? >>> >>> Thanks, >>> Sohani >>> >>> Sohani Weerasinghe >>> Software Engineer >>> WSO2, Inc: http://wso2.com >>> >>> Mobile : +94 716439774 >>> Blog :http://christinetechtips.blogspot.com/ >>> Twitter : https://twitter.com/sohanichristine >>> >>> On Thu, Mar 10, 2016 at 2:38 PM, Awanthika Senarath >>> wrote: >>> Hi, In migrating the Data mapper tool for ESB we need to $subject in order to differentiate between json schema and json files on loading from file system and registry. >>> How about introducing mediatype (if not available) from the registry. >> and file extension something like (.jsd similar to .xsd). >> >>> according to [1] the official mime type for json schema is " application/schema+json" and we can go ahead with that as the media type for json schema registry resources. For local file system files we can use .jschema to identify json-schema files. WDYT? [1] http://stackoverflow.com/questions/9391370/json-schema-file-extension Regards Awanthika Senarath Software Engineer, WSO2 Inc. Mobile: +94717681791 >>> >> >> >> -- >> *Susinda Perera* >> Software Engineer >> B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL) >> Mobile:(+94)716049075 >> Blog: susinda.blogspot.com >> WSO2 Inc. http://wso2.com/ >> Tel : 94 11 214 5345 Fax :94 11 2145300 >> >> > > ___ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Viraj Rajaguru Senior Software Engineer WSO2 Inc. : http://wso2.com Mobile: +94 77 3683068 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Deciding a file type for Json Schema
.jsc is commonly used for javascript configuration files [1] and .jsd is also in use according to [2], therefore IMO it is not suitable to use it for our purpose as it may introduce conflicts. [1] http://www.file-extensions.org/jsc-file-extension [2] http://filext.com/file-extension/JSD Regards Awanthika Awanthika Senarath Software Engineer, WSO2 Inc. Mobile: +94717681791 On Thu, Mar 10, 2016 at 2:48 PM, Susinda Perera wrote: > > > On Thu, Mar 10, 2016 at 2:41 PM, Sohani Weerasinghe > wrote: > >> How about using something like .jsc ? >> >> When we were using avro schema we have used .avsc as the extension hence >> shall we use .jsc ? >> >> Thanks, >> Sohani >> >> Sohani Weerasinghe >> Software Engineer >> WSO2, Inc: http://wso2.com >> >> Mobile : +94 716439774 >> Blog :http://christinetechtips.blogspot.com/ >> Twitter : https://twitter.com/sohanichristine >> >> On Thu, Mar 10, 2016 at 2:38 PM, Awanthika Senarath >> wrote: >> >>> Hi, >>> >>> In migrating the Data mapper tool for ESB we need to $subject in order >>> to differentiate between json schema and json files on loading from file >>> system and registry. >>> >> How about introducing mediatype (if not available) from the registry. and > file extension something like (.jsd similar to .xsd). > >> >>> according to [1] the official mime type for json schema is " >>> application/schema+json" and we can go ahead with that as the media >>> type for json schema registry resources. >>> >>> For local file system files we can use .jschema to identify json-schema >>> files. >>> >>> WDYT? >>> >>> >>> [1] >>> http://stackoverflow.com/questions/9391370/json-schema-file-extension >>> >>> Regards >>> Awanthika Senarath >>> Software Engineer, WSO2 Inc. >>> Mobile: +94717681791 >>> >>> >>> >> > > > -- > *Susinda Perera* > Software Engineer > B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL) > Mobile:(+94)716049075 > Blog: susinda.blogspot.com > WSO2 Inc. http://wso2.com/ > Tel : 94 11 214 5345 Fax :94 11 2145300 > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Deciding a file type for Json Schema
On Thu, Mar 10, 2016 at 2:41 PM, Sohani Weerasinghe wrote: > How about using something like .jsc ? > > When we were using avro schema we have used .avsc as the extension hence > shall we use .jsc ? > > Thanks, > Sohani > > Sohani Weerasinghe > Software Engineer > WSO2, Inc: http://wso2.com > > Mobile : +94 716439774 > Blog :http://christinetechtips.blogspot.com/ > Twitter : https://twitter.com/sohanichristine > > On Thu, Mar 10, 2016 at 2:38 PM, Awanthika Senarath > wrote: > >> Hi, >> >> In migrating the Data mapper tool for ESB we need to $subject in order to >> differentiate between json schema and json files on loading from file >> system and registry. >> > How about introducing mediatype (if not available) from the registry. and file extension something like (.jsd similar to .xsd). > >> according to [1] the official mime type for json schema is " >> application/schema+json" and we can go ahead with that as the media type >> for json schema registry resources. >> >> For local file system files we can use .jschema to identify json-schema >> files. >> >> WDYT? >> >> >> [1] http://stackoverflow.com/questions/9391370/json-schema-file-extension >> >> Regards >> Awanthika Senarath >> Software Engineer, WSO2 Inc. >> Mobile: +94717681791 >> >> >> > -- *Susinda Perera* Software Engineer B.Sc.(Eng), M.Sc(Computer Science), AMIE(SL) Mobile:(+94)716049075 Blog: susinda.blogspot.com WSO2 Inc. http://wso2.com/ Tel : 94 11 214 5345 Fax :94 11 2145300 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
Re: [Dev] Deciding a file type for Json Schema
How about using something like .jsc ? When we were using avro schema we have used .avsc as the extension hence shall we use .jsc ? Thanks, Sohani Sohani Weerasinghe Software Engineer WSO2, Inc: http://wso2.com Mobile : +94 716439774 Blog :http://christinetechtips.blogspot.com/ Twitter : https://twitter.com/sohanichristine On Thu, Mar 10, 2016 at 2:38 PM, Awanthika Senarath wrote: > Hi, > > In migrating the Data mapper tool for ESB we need to $subject in order to > differentiate between json schema and json files on loading from file > system and registry. > > according to [1] the official mime type for json schema is " > application/schema+json" and we can go ahead with that as the media type > for json schema registry resources. > > For local file system files we can use .jschema to identify json-schema > files. > > WDYT? > > > [1] http://stackoverflow.com/questions/9391370/json-schema-file-extension > > Regards > Awanthika Senarath > Software Engineer, WSO2 Inc. > Mobile: +94717681791 > > > ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev
[Dev] Deciding a file type for Json Schema
Hi, In migrating the Data mapper tool for ESB we need to $subject in order to differentiate between json schema and json files on loading from file system and registry. according to [1] the official mime type for json schema is " application/schema+json" and we can go ahead with that as the media type for json schema registry resources. For local file system files we can use .jschema to identify json-schema files. WDYT? [1] http://stackoverflow.com/questions/9391370/json-schema-file-extension Regards Awanthika Senarath Software Engineer, WSO2 Inc. Mobile: +94717681791 ___ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev