Should JArray operations be FFI like JObject?

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
api

Research direction

The issue names JArray operations and toArray, and compares them with JObject in purescript-json. Start by reading the linked pull request and the current implementations of those operations. Done means deciding whether the operations should use FFI and documenting or implementing that approach; the issue gives no specific operations or acceptance criteria.

Written by the indexing model from the issue text.

Description

enhancement

In https://github.com/purescript/purescript-json/pull/1 Array JSON was turned into JArray. I think this is a useful thing to do and a good assumption that a JArray is not necessarily an Array. However all JArray operation are implemented in terms of toArray. So we've changed the assumption from "It's always an Array" to "In order to observe anything, it must be converted to an Array". This implies that there is a 0-cost conversion to Array, since that would be the only way one could write performant codecs. Should JArray operations be FFI like JObject?

Dominant language
PureScript
Stars
17
Forks
3
Avg merge
2d 23h
Merged PRs (30d)
1

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from purescript/purescript-json

All issues in purescript/purescript-json

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.