Tag: tutorial

Json.NET & VB.NET – How to Deserialize an Object ?

One of the ways to Deserialize an object to JSON string in VB.NET in the Json.NET is using the DeSerializeObject method defined in the JsonConvert method. How to Deserialize an Object in VB.NET using Json.NET ? Below is a sample code snippet demonstrating how you can deserialize an object from Json string to VB.NET object using Json.NET. It takes the json string that contains the…

Cast Operator with Anonymous Types

Below is a sample sourecode that demonstrates the usage of the Cast Operator when using the anonymous type Cast Operator with Anonymous Types When the element within the List cannot be converted to the target type, you will receive an exception “InvalidCastException”.

Json.NET & Oxygene – Installing Json.NET for Remobjects Oxygene projects in Visual Studio 2015

Are you a developer using RemObjects Oxygene.NET and want to use Json.NET in your project . Check this series of articles to learn how to integrate Json.NET in your Oxygene project. Json.NET is one of the popular high performance and open source JSON framework for the .NET Developers. It lets the developers to serialize and deserialize .NET objects and is considered to be one of…

Java – How to document your code ?

Problem Statement You need to document your java classes so that it helps in maintenance. Solution Use Javadoc and place comments before any method , field or class to document. Just enter /** to start writing the comments using javadoc. The subsequent lines needs to begin with * and end the comment section with */ Below is a sample code demonstrating the usage of the…

Java How to – Get Environment Variables

Problem Statement You need to programmatically get the values of the environment variables from your java program. Solution Use java.lang.System.getenv method to get the environment variables from your java program from Java JDK 1.5 and higher version. You can pass the “PATH” as parameter to the method to retreive the path from the environment variable. When no arguments are passed, it returns all the environment…

Json.NET & C# – How to Deserialize an Object ?

One of the ways to Deserialize an object to JSON string in C# in the Json.NET is using the DeSerializeObject method defined in the JsonConvert method. How to Deserialize an Object in C# using Json.NET ? Below is a sample code snippet demonstrating how you can deserialize an object from Json string to C# object using Json.NET. It takes the json string that contains the…

Java – How to round a BigDecimal value in Java ?

Problem Statement You need round the BigDecimal value in your Java program. Solution Use the setScale method that is defined in the BigDecimal to round the value of the BigDecimal. You can also set the parameters like BigDecimal.ROUND_HALF_UP etc to the method. Output of the above program is Abundantcode.com Java Tutorials 10102.16

Json.NET & VB.NET – How to Serialize an Object ?

One of the ways to serialize an object to JSON string in VB.NET in the Json.NET is using the SerializeObject method defined in the JsonConvert method. The JsonConvert class provides an easy to use wrapper class and method over the JsonSerializer. How to Serialize an Object in VB.NET using Json.NET ? Below is the sample code snippet demonstrating the usage of JsonConvert.SerializeObject method in C#…