All Projects → jacobwilliams → Json Fortran

jacobwilliams / Json Fortran

Licence: other
A Fortran 2008 JSON API

Programming Languages

fortran
972 projects

Labels

Projects that are alternatives of or similar to Json Fortran

Bilibili Api Collect
哔哩哔哩-API收集整理【不断更新中....】
Stars: ✭ 4,497 (+1953.42%)
Mutual labels:  json
Baby
Create models from a JSON file, even a Baby can do it.
Stars: ✭ 214 (-2.28%)
Mutual labels:  json
Zio Json
Fast, secure JSON library with tight ZIO integration.
Stars: ✭ 218 (-0.46%)
Mutual labels:  json
Jsontreeviewer
json formatter/viewer/pretty-printer (with jsonTree javascript-library)
Stars: ✭ 211 (-3.65%)
Mutual labels:  json
Json Flatfile Datastore
Simple JSON flat file data store with support for typed and dynamic data.
Stars: ✭ 212 (-3.2%)
Mutual labels:  json
Dataset Serialize
JSON to DataSet and DataSet to JSON converter for Delphi and Lazarus (FPC)
Stars: ✭ 213 (-2.74%)
Mutual labels:  json
Cornichon
Scala DSL for testing HTTP JSON API
Stars: ✭ 211 (-3.65%)
Mutual labels:  json
Babelish
Chaotically confused, like Babel
Stars: ✭ 217 (-0.91%)
Mutual labels:  json
Octosql
OctoSQL is a query tool that allows you to join, analyse and transform data from multiple databases and file formats using SQL.
Stars: ✭ 2,579 (+1077.63%)
Mutual labels:  json
Elixir Json
Native JSON library for Elixir
Stars: ✭ 216 (-1.37%)
Mutual labels:  json
Biblia
Bíblia: XML + SQL + JSON
Stars: ✭ 211 (-3.65%)
Mutual labels:  json
React Json Editor Ajrm
A modular, easy to use, react component, to view, edit, and debug javascript objects.
Stars: ✭ 211 (-3.65%)
Mutual labels:  json
Json Dry
🌞 JSON-dry allows you to serialize & revive objects containing circular references, dates, regexes, class instances,...
Stars: ✭ 214 (-2.28%)
Mutual labels:  json
Webdis
A Redis HTTP interface with JSON output
Stars: ✭ 2,465 (+1025.57%)
Mutual labels:  json
Tj
stdin line timestamps. single binary, no dependencies. osx & linux & windows. plays well with jq.
Stars: ✭ 218 (-0.46%)
Mutual labels:  json
Jansson
C library for encoding, decoding and manipulating JSON data
Stars: ✭ 2,504 (+1043.38%)
Mutual labels:  json
Jsonbox
HTTP-based JSON storage.
Stars: ✭ 2,440 (+1014.16%)
Mutual labels:  json
Jsonapi Rb
Efficiently produce and consume JSON API documents.
Stars: ✭ 219 (+0%)
Mutual labels:  json
Scribble
A tiny Golang JSON database
Stars: ✭ 218 (-0.46%)
Mutual labels:  json
Json To Csv
Nested JSON to CSV Converter
Stars: ✭ 216 (-1.37%)
Mutual labels:  json

JSON-Fortran

GitHub release A Fortran 2008 JSON API

Table of Contents

Status

Build Status GitHub issues Codecov

Take a look at the CHANGELOG for a list of changes since the latest release.

top

Brief description

A user-friendly, thread-safe, and object-oriented API for reading and writing JSON files, written in modern Fortran.

top

Download

GitHub release homebrew version

Download the official versioned releases here. Or, get the latest development code from the master branch here.

NEWS: As of June 7, 2015, json-fortran can be downloaded and installed with the homebrew package manager on Mac OS X. Once homebrew is installed, make sure that the formulae are up to date, view the package options and caveats, and install the json-fortran formula:

brew update
brew info json-fortran
brew install --with-unicode-support json-fortran

Please note, if you wish to support usage of JSON-Fortran with multiple Fortran compilers, please follow the CMake installation instructions below, as the homebrew installation is only intended to support a single Fortran compiler. Cheers!

top

Building the library

The code requires a Fortran compiler that supports various Fortran 2003 and Fortran 2008 features such as: allocatable strings, newunit, generic, class, and abstract interface. It has been successfully compiled with the Intel Fortran compiler 13.1.0 (and greater) and the GNU gfortran compiler [4.9 and greater]. It has also been reported that the library can be built (using the CMake build script) with the NAG Fortran compiler 6.0

Currently, several ways are provided to build the JSON-fortran library (libjsonfortran).

  • A build script, build.sh is provided in the project root directory. This script uses FoBiS to build the JSON-Fortran library and the unit tests on Unix-like systems. Edit the script to use either the Intel Fortran Compiler or Gfortran. Note that version 1.2.5 of FoBiS (or later) is required.

  • A FoBiS configuration file (json-fortran.fobis) is also provided that can also build the library and examples. Use the mode flag to indicate what to build. For example:

    • To build all the examples using gfortran: FoBiS.py build -f json-fortran.fobis -mode tests-gnu
    • To build all the examples using ifort: FoBiS.py build -f json-fortran.fobis -mode tests-intel
    • To build a static library using gfortran: FoBiS.py build -f json-fortran.fobis -mode static-gnu
    • To build a static library using ifort: FoBiS.py build -f json-fortran.fobis -mode static-intel

    The full set of modes are: static-gnu, static-gnu-debug, static-intel, static-intel-debug, shared-gnu, shared-gnu-debug, shared-intel, shared-intel-debug, tests-gnu, tests-gnu-debug, tests-intel, tests-intel-debug

    To generate the documentation using ford, run: FoBis.py rule --execute makedoc -f json-fortran.fobis

    To run all the tests, run: FoBis.py rule --execute tests -f json-fortran.fobis

  • A Visual Studio project is included for building the library (and unit tests) on Windows with the Intel Fortran Compiler. The project has been tested with Visual Studio 2010 and 2013.

  • A CMake build system is provided. This build system has been tested on Mac and Linux using the Intel Fortran Compiler, gfortran 4.9, and NAG Fortran 6.0. It does also work on Windows (but note that the Visual Studio project it generates is not quite the same as the one mentioned above). This CMake based build provides an install target, and exports from both the install location and the build location so that building and using JSON-Fortran in another CMake based project is trivial. To get started with the CMake based build, set the environment variable FC to point to your Fortran compiler, and create a build directory. Then (cmake-gui|ccmake|cmake) /path/to/json-fortran-root to configure, make to build and make install to optionally install. You can also use make check to build and run the unit tests. As long as the project is built with CMake, other CMake projects can find it and link against it. For example, if you have a second copy of the JSON-Fortran project tree, and want to build the unit tests linking against those compiled/installed by the first copy:

cmake_minimum_required ( VERSION 2.8.8 FATAL_ERROR )
enable_language ( Fortran )
project ( jf_test NONE )

find_package ( jsonfortran-${CMAKE_Fortran_COMPILER_ID} 8.2.1 REQUIRED )
include_directories ( "${jsonfortran_INCLUDE_DIRS}" )

file ( GLOB JF_TEST_SRCS "src/tests/jf_test_*.F90" )
foreach ( UNIT_TEST ${JF_TEST_SRCS} )
  get_filename_component ( TEST ${UNIT_TEST} NAME_WE )
  add_executable ( ${TEST} ${UNIT_TEST} )
  target_link_libraries ( ${TEST} jsonfortran-static )
  # or for linking against the dynamic/shared library:
  # target_link_libraries ( ${TEST} jsonfortran ) # instead
endforeach()

top

Documentation

The API documentation for the latest release version can be found here. The documentation can also be generated by processing the source files with FORD. Note that both the shell script and CMake will also generate these files automatically in the documentation folder, assuming you have FORD installed.

Some examples can also be found on the wiki.

top

Contributing

Want to help? Take a quick look at our contributing guidelines then claim something and Fork. Commit. Pull request.

top

License

The JSON-Fortran source code and related files and documentation are distributed under a permissive free software license (BSD-style). See the LICENSE file for more details.

top

Miscellaneous

top

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].