spm_jsonread.m 976 B

1234567891011121314151617181920212223
  1. function json = spm_jsonread(filename, opts)
  2. % JSON (JavaScript Object Notation) parser - a compiled routine
  3. % FORMAT json = spm_jsonread(filename, opts)
  4. % filename - name of a JSON file or JSON string
  5. % json - JSON structure
  6. % opts - structure of optional parameters:
  7. % replacementStyle: string to control how non-alphanumeric
  8. % characters are replaced {'underscore','hex','delete','nop'}
  9. % [Default: 'underscore']
  10. %
  11. % References:
  12. % JSON Standard: http://www.json.org/
  13. % JSMN C parser: http://zserge.com/jsmn.html
  14. % jsondecode: http://www.mathworks.com/help/matlab/ref/jsondecode.html
  15. %__________________________________________________________________________
  16. % Copyright (C) 2015-2017 Wellcome Trust Centre for Neuroimaging
  17. % Guillaume Flandin
  18. % $Id: spm_jsonread.m 7045 2017-03-17 10:41:12Z guillaume $
  19. %-This is merely the help file for the compiled routine
  20. error('spm_jsonread.c not compiled - see Makefile')