Skip to content

Commit 4685fa4

Browse files
committed
Improve UCS4 macro + character kind documentation
1 parent 20b207f commit 4685fa4

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

src/json_module.F90

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
!> author: Jacob Williams
33
! license: BSD
44
!
5-
! JSON-FORTRAN: A Fortran 2008 JSON (JavaScript Object Notation) API.
5+
!# JSON-FORTRAN:
6+
! A Fortran 2008 JSON (JavaScript Object Notation) API.
7+
!
8+
! [TOC]
69
!
710
! This module provides an interface for reading and writing JSON files.
811
!
@@ -19,14 +22,20 @@
1922
! The documentation given here assumes ```USE_UCS4``` **is not** defined.
2023
#endif
2124
!
22-
!@note ```CK``` and ```CDK``` are the json-fortran character kind and json-fortran default
23-
! character kind respectively. Client code must ensure characters of kind=CK
24-
! are used for all character variables and strings passed to the json-fortran
25-
! library *EXCEPT* for file names which must be of ```'DEFAULT'``` character kind,
26-
! provided here as ```CDK```. In particular, any: json path, character or string, or
27-
! object name passed to the json-fortran library *MUST* be of type ```CK```.
25+
!@warning ```CK``` and ```CDK``` are the json-fortran character kind and json-fortran default
26+
! character kind respectively. Client code **MUST** ensure characters of ```kind=CK```
27+
! are used for all character variables and strings passed to the json-fortran
28+
! library *EXCEPT* for file names which must be of ```'DEFAULT'``` character kind,
29+
! provided here as ```CDK```. In particular, any variable that is a: json path, string
30+
! value or object name passed to the json-fortran library **MUST** be of type ```CK```.
31+
!
32+
!@note Most string literal constants of default kind are fine to pass as arguments to
33+
! JSON-Fortran procedures since they have been overloaded to accept ```intent(in)```
34+
! character arguments of the default (```CDK```) kind. If you find a procedure which does
35+
! not accept an ```intent(in)``` literal string argument of default kind, please
36+
! [file an issue](https://github.com/jacobwilliams/json-fortran/issues/new) on github.
2837
!
29-
!# License
38+
!## License
3039
!
3140
! **json-fortran License:**
3241
!
@@ -78,7 +87,7 @@
7887
! OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
7988
! DEALINGS IN THE SOFTWARE.
8089
!
81-
!# History
90+
!## History
8291
! * Joseph A. Levin : March 2012 : Original FSON code [retrieved on 12/2/2013].
8392
! * Jacob Williams : 2/8/2014 : Extensive modifications to the original FSON code.
8493
! The original F95 code was split into four files:
@@ -89,7 +98,7 @@
8998
! (e.g., allocatable strings, newunit, generic, class, and abstract interface).
9099
! * Development continues at: [Github](http://github.com/jacobwilliams/json-fortran)
91100
!
92-
!# See also
101+
!## See also
93102
! * [json-fortran development site](http://github.com/jacobwilliams/json-fortran)
94103
! * [json-fortran online documentation](http://jacobwilliams.github.io/json-fortran)
95104
! * [JSON website](http://www.json.org/)

0 commit comments

Comments
 (0)