Skip to main content

Showing tag results for Objects

Posts

0 comments 0 reactions

Converting Strings to JSON Objects in TypeScript

Jagdish Kumawat

JSON.parse works in TypeScript just as in JavaScript: it turns a JSON string into an object or an array, and throws a SyntaxError for invalid JSON.

  • Programming
  • JSON
  • TypeScript
0 comments 0 reactions

Converting Strings to JSON Objects in Rust

Jagdish Kumawat

With serde and serde_json, one call to serde_json::from_str turns a JSON string into your own Rust struct.

  • Programming
  • JSON
0 comments 0 reactions

Converting Strings to JSON Objects in Kotlin

Jagdish Kumawat

Kotlin has two common ways to read JSON text: the org.json classes and Google’s Gson. This guide shows both, for objects and for arrays.

  • Programming
  • JSON
  • Mobile Development
0 comments 0 reactions

Converting Strings to JSON Objects in Go (Golang)

Jagdish Kumawat

Go’s encoding/json package reads JSON text with json.Unmarshal, into structs, slices or a map[string]interface{} for dynamic JSON.

  • Programming
  • JSON
0 comments 0 reactions

Converting Strings to JSON Objects in PHP

Jagdish Kumawat

PHP’s built-in json_decode turns a JSON string into an object, or into an associative array when you pass true.

  • Programming
  • JSON
0 comments 0 reactions

Converting Strings to JSON Objects in Java

Jagdish Kumawat

Two popular Java libraries, org.json and Gson, turn a JSON string into JSON objects and arrays. This guide shows both.

  • Programming
  • JSON
  • Java
0 comments 0 reactions

Converting Strings to JSON Objects in .NET C#

Jagdish Kumawat

Newtonsoft.Json’s JsonConvert.DeserializeObject turns JSON text into your own C# classes, for single objects and for arrays.

  • Programming
  • CSharp
  • JSON