Skip to content

포매터 및 코드

JSON을 Haskell 데이터 타입으로

Haskell records with FromJSON / ToJSON instances.

Runs in your browser

편집자 노트

Understanding · Records, deriving, and FromJSON.

이 심층 챕터는 현재 영어로만 제공됩니다. 위의 변환 도구는 귀하의 언어로 작동하지만, 긴 설명 글은 아직 번역되지 않았습니다.

자주 묻는 질문

Quick answers.

Which Haskell libraries are supported?

The generator focuses on the `Aeson` library, producing `FromJSON` and `ToJSON` instances compatible with modern Haskell development.

How does it handle nested objects?

Nested JSON objects are converted into separate Haskell data types, with the parent record referencing these types as fields.

Are Haskell naming conventions followed?

Yes. The tool converts snake_case or camelCase JSON keys into valid Haskell record fields, typically prepending the type name to avoid namespace collisions.

Can I use this for complex arrays?

Arrays of objects are mapped to Haskell lists of a specific type, while mixed-type arrays may require manual adjustment into a Sum type or `Value`.

사람들이 다음도 검색합니다.

관련 도구

More in this room.

모두 보기 포매터 및 코드