2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

JavaScriptAdvent Calendar 2024

Day 5

JSON.stringify()って結局何?

Posted at

概要

jsでJSONのレスポンスを作るときに大体使うJSON.stringify()が何者なのかざっくり調べてみた。

内容

一言でいうと「jsのオブジェクトをJSONに変換してくれるメソッド」のこと。
第一引数でJSONに変換したいオブジェクト
第二引数は省略可能で、第一引数で渡したオブジェクトからプロパティを抜粋したり除外したりしてJSON化したいときに使用
第三引数は省略可能で、JSON化後のインデント数を指定

参考文献

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?