Programming With Swift
  • Home
  • About
  • Github
Sign in Subscribe

JSON

A collection of 4 posts
How to pretty-print JSON with JavaScript
JavaScript

How to pretty-print JSON with JavaScript

In this tutorial I will show you how you can pretty print a JSON string. It is a one liner, but it makes all the difference. Normally when we use JSON.stringify, we only want to serialise a JSON object, but sometimes after we serialise it, we might want to
29 Aug 2021 1 min read
How to Read and Write JSON with NodeJS
Node

How to Read and Write JSON with NodeJS

In this tutorial we will go over how read and write a JSON file with NodeJS. It should come at no surprise that Node makes working with JSON extremely easy, and with the built in fs module, reading and writing to the file system is equally easy. This tutorial is
29 Aug 2021 6 min read
How to convert Dictionary to Json with Swift
Swift

How to convert Dictionary to Json with Swift

It is a common task to convert a Dictionary to JSON. In this tutorial I will show you how you can do just that, luckily for us, Swift makes this incredibly easy. A quick note before we get started, the dictionary's value needs conform to Encodable or Codable.
06 Oct 2020 1 min read
How to save/write Json to file with Swift
Swift

How to save/write Json to file with Swift

In this tutorial I will show you two methods that you can use to write JSON data/string to a file using Swift. Save JSON string to file Saving a JSON string will be the same as saving any other kind of string. Since Swift will see it as a
24 Aug 2020 2 min read
Page 1 of 1
Programming With Swift © 2025
Powered by Ghost