What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-21 06:46:06
Serialization and Deserialization
public class someClass { //your lcode and logic... ObjectMapper mapper = new ObjectMapper(); SimpleModule module = new SimpleModule(); module.addSerializer(MyAwesomeClass.class, new MyAwesomeSerializer()); mapper.registerModule(module); jsonNode = mapper... Add solution -
Other 2021-10-16 23:46:06
how to handle cookie
To handle cookie in postman there is a button called cookie to give us a way to add cookie to certain domain by providing key+value pair Once added any request sent to the same domain, can access that cookie. We can also access to the cookie in test tab. ... Add solution -
Javascript 2021-10-16 19:08:03
how to convert jsonobject
import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; public class TestJSON { public static void main(String[] args) { JSONObject jObject = new JSONObject(); jObject.put("E... Add solution -
Java 2021-10-16 18:09:07
threadsafe singleton pattern in java
package com.journaldev.designpatterns; public class ASingleton { private static volatile ASingleton instance; private static Object mutex = new Object(); private ASingleton() { } public static ASingleton getInstance() { ASingleton result = inst... Add solution -
Other 2021-10-16 06:12:08
implement swift protocol in kotlin
As of now, K/N requires many extra methods when implementing an Objective-C or Swift protocol. Subclassing NSObject removes this requirement class Foo: BarProtocol // Override BarProtocol methods and all NSObject methods class Foo: NSObject(), Ba... Add solution -
Java 2021-10-15 16:27:07
objectoutputstream exemple
public static void main(String[] args) throws IOException, ClassNotFoundException { Obj array[] = new Obj[10]; for (int i = 0; i < array.length; i++) { array[i] = new Emp(i); } try { ObjectOutputStream fOUT = new ObjectOutputStream(new ... Add solution -
Javascript 2021-10-14 19:02:07
java serialize object to json
public class someClass { //your lcode and logic... ObjectMapper mapper = new ObjectMapper(); SimpleModule module = new SimpleModule(); module.addSerializer(MyAwesomeClass.class, new MyAwesomeSerializer()); mapper.registerModule(module); jsonNode = mapper... Add solution
Best helpers
Ranking is empty