{% set version = '1.8.7' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-jsonlite
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/jsonlite_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/jsonlite/jsonlite_{{ version }}.tar.gz
  sha256: 7d42b7784b72d728698ea02b97818df51e2015ffa39fec2eaa2400771b0f601c

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: httr, vctrs, testthat, knitr, rmarkdown, R.rsp, sf
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base

  run:
    - r-base
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('jsonlite')"           # [not win]
    - "\"%R%\" -e \"library('jsonlite')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://jeroen.r-universe.dev/jsonlite https://arxiv.org/abs/1403.2805
  license: MIT
  summary: A reasonably fast JSON parser and generator, optimized for statistical data and the
    web. Offers simple, flexible tools for working with JSON in R, and is particularly
    powerful for building pipelines and interacting with a web API. The implementation
    is based on the mapping described in the vignette (Ooms, 2014). In addition to converting
    JSON data from/to R objects, 'jsonlite' contains functions to stream, validate,
    and prettify JSON data. The unit tests included with the package verify that all
    edge cases are encoded and decoded consistently for use with dynamic data in systems
    and applications.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - ocefpaf
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: jsonlite
# Version: 1.8.7
# Title: A Simple and Robust JSON Parser and Generator for R
# License: MIT + file LICENSE
# Depends: methods
# Authors@R: c( person("Jeroen", "Ooms", role = c("aut", "cre"), email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289")), person("Duncan", "Temple Lang", role = "ctb"), person("Lloyd", "Hilaiel", role = "cph", comment="author of bundled libyajl"))
# URL: https://jeroen.r-universe.dev/jsonlite https://arxiv.org/abs/1403.2805
# BugReports: https://github.com/jeroen/jsonlite/issues
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# VignetteBuilder: knitr, R.rsp
# Description: A reasonably fast JSON parser and generator, optimized for statistical data and the web. Offers simple, flexible tools for working with JSON in R, and is particularly powerful for building pipelines and interacting with a web API. The implementation is based on the mapping described in the vignette (Ooms, 2014). In addition to converting JSON data from/to R objects, 'jsonlite' contains functions to stream, validate, and prettify JSON data. The unit tests included with the package verify that all edge cases are encoded and decoded consistently for use with dynamic data in systems and applications.
# Suggests: httr, vctrs, testthat, knitr, rmarkdown, R.rsp, sf
# RoxygenNote: 7.2.3
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2023-06-29 08:00:03 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Duncan Temple Lang [ctb], Lloyd Hilaiel [cph] (author of bundled libyajl)
# Repository: CRAN
# Date/Publication: 2023-06-29 22:10:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
