scriptsharp icon indicating copy to clipboard operation
scriptsharp copied to clipboard

Simpler attributes for imported classes

Open volkanceylan opened this issue 13 years ago • 3 comments

I am extensively using imported classes for calling JSON based web services. Having to write [PreserveCase] before all fields is overkill and one may forget it. Could we write [PreserveCases] before class definition and it applies to all members automatically?

Also for a simple imported class one has to write [Imported, IgnoreNamespace, ScriptName("Object")]. public class SomeImportedObject {....

Could we just write [JsonObject] public class SomeImportedObject {....

volkanceylan avatar Mar 08 '12 09:03 volkanceylan

Sounds good to me.

andrewharry avatar Mar 08 '12 23:03 andrewharry

Looks good actually, to cleanup the burden of porting.

keremkusmezer avatar Mar 21 '12 09:03 keremkusmezer

+1 - I'd like to see general clean up / simplification of all the attributes.

It would be nice to move AlternateSignatureAttribute to System - it feels odd needing to reference System.Runtime.CompilerServices in code files that contain non-imported classes.

strygo avatar May 21 '12 18:05 strygo