currently i'm using web request body of webpage strictly json. var request = webrequest.create("urihere"); string text; var response = (httpwebresponse)request.getresponse(); using (var sr = new streamreader(response.getresponsestream())) { text = sr.readtoend(); } now i've got string of json in variable i'm trying figure out how parse data. i'm attempting use json.net below: user primaryuser = new models.user(); primaryuser.fullname = "test"; jsonserializer serializer = new jsonserializer(); serializer.converters.add(new javascriptdatetimeconverter()); serializer.nullvaluehandling = nullvaluehandling.ignore; using (streamwriter sw = new streamwriter("filenamehere")) using (jsonwriter writer = new jsontextwriter(sw)) { serializer.serialize(writer, primary...
i have entity inherits other. on other hand, i'm using lombok project reduce boilerplate code, put @data annotation. annotation @data inheritance produces next warning: generating equals/hashcode implementation without call superclass, though class not extend java.lang.object. if intentional, add '@equalsandhashcode(callsuper=false)' type. is advisable add annotation @equalsandhashcode (callsuper = true) or @equalsandhashcode (callsuper = false) ? if not added, 1 callsuper=false or callsuper=true ? the default value false . 1 if don't specify , ignore warning. yes, recommended add @equalsandhashcode annotation on @data annotated classes extend else object. cannot tell if need true or false , depends on class hierarchy, , need examined on case-by-case basis. however, project or package, can configure in lombok.config call super methods if not direct subclass of object. lombok.equalsandhashcode.callsuper = call for configuration system ...
Comments
Post a Comment