kotlin-convert-json-to-object-feature-image

Kotlin – Convert JSON to Object and vice versa using Jackson

In this tutorial, we’re gonna look at way to convert JSON string, JSON file, JSON url into Object, Array, Map and do the opposite: convert Object to JSON String in Kotlin using Jackson library.

Related Posts:
Kotlin List & Mutable List tutorial with examples
Kotlin – parse JSON to object & convert object to JSON using Gson
Kotlin – Convert object of a Data Class to another Data Class object

Read More

kotlin-sort-list-objects-feature-image

Kotlin – Sort List of custom Objects

In this tutorial, I will show you several useful ways to sort List of custom Objects for Ascending and Descending order in Kotlin. You’re gonna know how to:

  • sort List of Objects by one field or multiple fields
  • use your custom Comparator to sort List of Objects
  • implement Comparable interface to make sorting List of Objects more convenient

Related Posts:
Kotlin List & Mutable List tutorial with examples
Kotlin – Compare Objects with Comparable Example

Read More

kotlin-sum-sumby-sumbydouble-bigdecimal-list-map-feature-image

Kotlin sum(), sumBy(), sumByDouble() and BigDecimal in List, Map example

In this Kotlin tutorial, I will show you some examples that uses sum(), sumBy(), sumByDouble() for List, Map. We’re gonna create sum() & sumByBigDecimal() which also work for List of BigDecimal objects.

Related Posts:
Kotlin List & Mutable List tutorial with examples
Kotlin Fold Example: fold(), foldRight(), foldIndexed(), foldRightIndexed()
Kotlin groupBy(), groupingBy() example

Read More