{"id":17195938,"url":"https://github.com/npryce/snodge","last_synced_at":"2025-05-05T18:47:17.188Z","repository":{"id":15230435,"uuid":"17959152","full_name":"npryce/snodge","owner":"npryce","description":"Randomly mutate JSON, XML, HTML forms, text and binary data for fuzz testing","archived":false,"fork":false,"pushed_at":"2023-03-08T16:49:22.000Z","size":6355,"stargazers_count":160,"open_issues_count":1,"forks_count":8,"subscribers_count":7,"default_branch":"kotlin","last_synced_at":"2025-04-11T14:58:49.750Z","etag":null,"topics":["binary","forms","fuzz-testing","fuzzing","javascript","json","jvm","kotlin","kotlin-library","test-driven-development","testing","text","xml"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/npryce.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":"2014-03-20T21:28:49.000Z","updated_at":"2024-11-14T06:58:28.000Z","dependencies_parsed_at":"2024-10-15T01:52:02.058Z","dependency_job_id":"4f2d4287-c831-4d4f-aa3c-439c5e148b47","html_url":"https://github.com/npryce/snodge","commit_stats":{"total_commits":298,"total_committers":3,"mean_commits":99.33333333333333,"dds":"0.15771812080536918","last_synced_commit":"f6da35610c0c33da5a781efe38237cb9a4b6ca23"},"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fsnodge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fsnodge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fsnodge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/npryce%2Fsnodge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/npryce","download_url":"https://codeload.github.com/npryce/snodge/tar.gz/refs/heads/kotlin","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252555986,"owners_count":21767269,"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":["binary","forms","fuzz-testing","fuzzing","javascript","json","jvm","kotlin","kotlin-library","test-driven-development","testing","text","xml"],"created_at":"2024-10-15T01:51:55.866Z","updated_at":"2025-05-05T18:47:17.124Z","avatar_url":"https://github.com/npryce.png","language":"Kotlin","readme":"Snodge\n======\n\n[![Kotlin](https://img.shields.io/badge/kotlin-1.3.61-blue.svg)](http://kotlinlang.org)\n[![Build Status](https://travis-ci.org/npryce/snodge.svg?branch=kotlin)](https://travis-ci.org/npryce/snodge)\n[![Maven Central](https://img.shields.io/maven-central/v/com.natpryce/snodge.svg)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22com.natpryce%22%20AND%20a%3A%22snodge%22)\n[![npm](https://img.shields.io/npm/v/snodge-3.svg)]()\n\n\nA small, extensible Kotlin library to randomly mutate JSON \u0026 XML documents, text and binary data. Useful for [fuzz testing](https://en.wikipedia.org/wiki/Fuzzing).\n\nExamples of things you can test by mutating known good data:\n\n- unexpected structures will not make your application code throw unchecked exceptions\n- your application code ignores additional properties\n- your application code does not throw unchecked exceptions when parsing values from text properties\n- your application does not instantiate arbitrary classes named in data (a potential security risk)\n- your application copes with invalid Unicode encoding of text\n- and much, much more!\n\nSee an [interactive demonstration](https://npryce.github.io/snodge/demo/demo.html).\n\n\n\nIn a Nutshell\n-------------\n\nAdd a dependency on Snodge (replace `\u003cversion\u003e` with the version of Snodge you wish to use):\n\n~~~~~~~~~~~~~~~~~~~~~~gradle\ntestImplementation 'com.natpryce:snodge:\u003cversion\u003e'\n~~~~~~~~~~~~~~~~~~~~~~\n\nFor the JVM platform, add an implementation of the [JSR-374 JSONP API](http://docs.oracle.com/middleware/1213/wls/WLPRG/java-api-for-json-proc.htm), such as:\n\n~~~~~~~~~~~~~~~~~~~~~~gradle\ntestRuntimeOnly 'org.glassfish:javax.json:1.1'\n~~~~~~~~~~~~~~~~~~~~~~\n\nImport the library:\n\n~~~~~~~~~~~~~~~~~~~~~~kotlin\nimport com.natpryce.snodge.mutants\nimport com.natpryce.snodge.json.defaultJsonMutagens\n~~~~~~~~~~~~~~~~~~~~~~\n\nOutput 10 random mutations of the JSON document:\n\n~~~~~~~~~~~~~~~~~~~~~~kotlin\nval random = Random()\nval originalJson = \"{\\\"x\\\": \\\"hello\\\", \\\"y\\\": [1,2,3]}\"\n\nrandom.mutants(defaultJsonMutagens().forStrings(), 10, originalJson)\n    .forEach(::println)\n~~~~~~~~~~~~~~~~~~~~~~\n\nExample output:\n\n~~~~~~~~~~~~~~~~~~~~~~\n{\"x\":\"hello\",\"y\":[1,2,3,null]}\n{\"y\":[1,2,3],\"x\":{}}\n{\"x\":\"hello\",\"y\":[2,3]}\n{\"x\":\"hello\",\"y\":[{},2,3]}\n{\"x\":\"hello\"}\n{\"x\":\"hello\",\"y\":[1,2,{}]}\n{\"x\":\"hello\",\"y\":[1,null,3]}\n{\"y\":[1,2,3],\"x\":\"hello\"}\n{\"y\":[1,2,3],\"x\":\"a string\"}\n{\"x\":\"hello\",\"y\":[99,2,3]}\n~~~~~~~~~~~~~~~~~~~~~~\n\nAPI Adapters\n------------\n\nOn the JVM, Snodge can mutate the JSON object models of the [Jackson](https://github.com/FasterXML/jackson), [GSON](https://github.com/google/gson) \u0026 [JSR-374 JSONP](http://docs.oracle.com/middleware/1213/wls/WLPRG/java-api-for-json-proc.htm) and [Argo](http://argo.sourceforge.net/) APIs, XML DOM, and JSON and XML serialised as text and binary. \n\nOn JavaScript, Snodge can mutate XML as DOM Documents, and XML and JSON as text.\n\nFor more information, continue reading [the documentation](doc/).\n\nOther versions\n--------------\n\nThe Kotlin library is version 3.x.x.x.  \n\nPrevious versions:\n\n- Version 2.x.x.x (java8 branch) is for Java 8, and uses streams and Java 8 function types\n- Version 1.x.x.x (java7 branch) is for Java 7 and depends on Guava\n\n[Download from Maven Central](http://mvnrepository.com/artifact/com.natpryce/snodge)\n\n[Download from NPM](https://www.npmjs.com/package/snodge-3)\n\n","funding_links":[],"categories":["Technologies we used in the Microservices"],"sub_categories":["Testing"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpryce%2Fsnodge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnpryce%2Fsnodge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnpryce%2Fsnodge/lists"}