{"id":23626274,"url":"https://github.com/yetanalytics/java-xapi-tools","last_synced_at":"2025-11-07T17:30:40.354Z","repository":{"id":264666133,"uuid":"891057812","full_name":"yetanalytics/java-xapi-tools","owner":"yetanalytics","description":null,"archived":false,"fork":false,"pushed_at":"2025-01-14T14:21:23.000Z","size":559,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-14T15:43:15.405Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/yetanalytics.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":"2024-11-19T16:47:02.000Z","updated_at":"2025-01-14T14:21:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a7fe5ae-6a72-4204-b854-6c21b7419f2b","html_url":"https://github.com/yetanalytics/java-xapi-tools","commit_stats":null,"previous_names":["yetanalytics/java-xapi-tools"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fjava-xapi-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fjava-xapi-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fjava-xapi-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yetanalytics%2Fjava-xapi-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yetanalytics","download_url":"https://codeload.github.com/yetanalytics/java-xapi-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239533784,"owners_count":19654765,"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":[],"created_at":"2024-12-27T22:52:47.004Z","updated_at":"2025-11-07T17:30:40.307Z","avatar_url":"https://github.com/yetanalytics.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java xAPI Library\n\nThis library is intended to be a toolkit for using xAPI in Java. Right now it has Jackson model objects for serialization and deserialization of xAPI statements, as well as a configured Jackson ObjectMapper to perform the operations.\n\n## Jackson Serialization and Deserialization\n\nThis library comes with a model of xAPI Statements and components which should allow easy conversion between Java Objects and JSON. Currently it is tailored to support xAPI Version 1.0.0-1.0.3. Newer versions will be supported in the future.\n\n### Deserialization\n\nDeserialization can be performed on xAPI Strings or files or inputstreams using the provided ObjectMapper.\n\nTake the following xAPI Statement:\n\n```\n{\n  \"id\": \"6fbd600f-b17c-4c74-801a-2ec2e53231c8\",\n  \"actor\": { \"mbox\": \"mailto:student1@example.com\" },\n  \"verb\": {\"id\": \"https://xapi.yetanalytics.com/profile/concepts/verbs/did\" },\n  \"object\": {\"id\": \"https://xapi.yetanalytics.com/profile/concepts/activities/act1\" },\n  \"timestamp\": \"2023-10-27T09:03:21.723Z\",\n  \"stored\": \"2023-10-27T09:03:21.723Z\"\n}\n```\nYou can turn it into a Statement Object like so:\n\n```\nimport com.yetanalytics.xapi.model.Statement;\nimport com.yetanalytics.xapi.util.Mapper;\n...\nStatement stmt = Mapper.getMapper().readValue(xApiString, Statement.class);\nSystem.out.println(stmt.getVerb().getId()); \n\n//-\u003e \"https://xapi.yetanalytics.com/profile/concepts/verbs/did\"\n\n```\n\n### Serialization\n\nThe process for creating xAPI JSON is very similar, just take one of the objects write it out.\n\n```\nString xapi = Mapper.getMapper().writeValueAsString(stmt);\n\n```\nWhich produces a JSON statement identical to the one at the top.\n\n### Use with Custom ObjectMapper\n\nIf you need to create your own ObjectMapper or prefer to use an existing one in your project, please refer to the additional configuration in [Mapper.java](src/main/java/com/yetanalytics/xapi/util/Mapper.java). The most important is adding the Java Time module to the Mapper because it does not ship with java.time support.\n\n## LRS Client\n\nComing Soon...\n\n## xAPI Validation\n\nComing Soon...\n\n## License\n\nCopyright © 2024-2025 Yet Analytics, Inc.\n\nDistributed under the Apache License version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyetanalytics%2Fjava-xapi-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyetanalytics%2Fjava-xapi-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyetanalytics%2Fjava-xapi-tools/lists"}