{"id":26031672,"url":"https://github.com/apache/uima-uimaj-io-jsoncas","last_synced_at":"2026-02-08T04:33:20.086Z","repository":{"id":37779457,"uuid":"457384816","full_name":"apache/uima-uimaj-io-jsoncas","owner":"apache","description":"Apache UIMA Java SDK JSON CAS Support","archived":false,"fork":false,"pushed_at":"2024-02-24T09:19:09.000Z","size":494,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-03T04:17:11.946Z","etag":null,"topics":["apache","java","json","text-analysis","uima"],"latest_commit_sha":null,"homepage":"https://uima.apache.org/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-09T14:07:59.000Z","updated_at":"2024-08-20T11:52:04.000Z","dependencies_parsed_at":"2024-02-24T10:35:31.444Z","dependency_job_id":null,"html_url":"https://github.com/apache/uima-uimaj-io-jsoncas","commit_stats":{"total_commits":370,"total_committers":5,"mean_commits":74.0,"dds":0.2810810810810811,"last_synced_commit":"47f0d5add8090b7056ec1614a2a087795f1243f1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fuima-uimaj-io-jsoncas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fuima-uimaj-io-jsoncas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fuima-uimaj-io-jsoncas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fuima-uimaj-io-jsoncas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/uima-uimaj-io-jsoncas/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247730062,"owners_count":20986404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache","java","json","text-analysis","uima"],"created_at":"2025-03-06T20:20:09.410Z","updated_at":"2026-02-08T04:33:20.058Z","avatar_url":"https://github.com/apache.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON serialization of the Apache UIMA CAS\n\nThe JSON CAS I/O implementation for use with the UIMA Java SDK allows to serialize UIMA CAS data to\nJSON and to de-serialize the data back from JSON again, loading it into a CAS object. The aim of\nthis library is to facilitate the data interoperability of UIMA data across different platform and \nprogramming languages. For example, the implementation contains functionality to deal with the \ndifferent character offset counting strategies used by different languages such as Java and Python.\n\n## Example\n\nHere is a small example of a JSON CAS document from the unit test data. It is not meant to\nbe a meaningful example, just one that shows some of the elements of the JSON format and how they\nare encoded. Please refer to the [specification](SPECIFICATION.adoc) for an in-depth description.\n\n```\n{\n  \"%TYPES\" : { },\n  \"%FEATURE_STRUCTURES\" : [ {\n    \"%ID\" : 1,\n    \"%TYPE\" : \"uima.cas.Sofa\",\n    \"sofaNum\" : 1,\n    \"sofaID\" : \"_InitialView\",\n    \"mimeType\" : \"text\",\n    \"sofaString\" : \"This is a test\"\n  }, {\n    \"%ID\" : 2,\n    \"%TYPE\" : \"uima.tcas.Annotation\",\n    \"@sofa\" : 1,\n    \"begin\" : 0,\n    \"end\" : 4\n  }, {\n    \"%ID\" : 3,\n    \"%TYPE\" : \"uima.tcas.Annotation\",\n    \"@sofa\" : 1,\n    \"begin\" : 5,\n    \"end\" : 7\n  }, {\n    \"%ID\" : 4,\n    \"%TYPE\" : \"uima.tcas.Annotation\",\n    \"@sofa\" : 1,\n    \"begin\" : 8,\n    \"end\" : 9\n  }, {\n    \"%ID\" : 5,\n    \"%TYPE\" : \"uima.tcas.Annotation\",\n    \"@sofa\" : 1,\n    \"begin\" : 10,\n    \"end\" : 14\n  }, {\n    \"%ID\" : 6,\n    \"%TYPE\" : \"uima.tcas.DocumentAnnotation\",\n    \"@sofa\" : 1,\n    \"begin\" : 0,\n    \"end\" : 14,\n    \"language\" : \"x-unspecified\"\n  } ],\n  \"%VIEWS\" : {\n    \"_InitialView\" : {\n      \"%SOFA\" : 1,\n      \"%MEMBERS\" : [ 2, 3, 4, 5, 6 ]\n    }\n  }\n}\n```\n\n## Reading and writing JSON CAS\n\n**Serializing a CAS to JSON**\n\n```\nimport org.apache.uima.json.jsoncas2.JsonCas2Serializer\n\nCAS cas = ...;\nnew JsonCas2Serializer().serialize(cas, new File(\"cas.json\"));\n```\n\n**De-serializing a CAS from JSON**\n\n```\nimport org.apache.uima.json.jsoncas2.JsonCas2Deserializer;\n\nCAS cas = ...; // The CAS must already be prepared with the type system used by the CAS JSON file\nnew JsonCas2Deserializer().deserialize(new File(\"cas.json\"), cas);\n```\n\n## Format specification\n\nFor the format specification, please refer [here](SPECIFICATION.adoc).\n\n## Other UIMA JSON CAS implementations\n\nA Python-based implementation of the UIMA JSON CAS format is available as part of the third-party\n[DKPro Cassis](https://github.com/dkpro/dkpro-cassis) library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fuima-uimaj-io-jsoncas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fuima-uimaj-io-jsoncas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fuima-uimaj-io-jsoncas/lists"}