Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/superfell/json2apex
Generate strongly typed apex code from a json structure.
https://github.com/superfell/json2apex
apex java json salesforce
Last synced: about 1 month ago
JSON representation
Generate strongly typed apex code from a json structure.
- Host: GitHub
- URL: https://github.com/superfell/json2apex
- Owner: superfell
- License: mit
- Created: 2011-11-10T06:07:25.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2021-04-01T15:25:38.000Z (almost 4 years ago)
- Last Synced: 2023-10-20T23:17:35.555Z (about 1 year ago)
- Topics: apex, java, json, salesforce
- Language: Python
- Homepage: https://json2apex.herokuapp.com
- Size: 775 KB
- Stars: 132
- Watchers: 17
- Forks: 82
- Open Issues: 13
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# JSON2Apex
This app allows a user to paste in an instance of a json document, and have it generate strongly typed apex code that can deserialize it.
Its written in Java using the Play! framework, if you want to try it out, its running at http://json2apex.herokuapp.com
JSON2Apex is open source under the MIT license.
## About integration-tests
The integration-test folder contains a modified version of beatbox that can call the compileClass API in the Apex API, there's a test
runner that will post the test json's to a running instance of the app and then send them to saleforce, if salesforce reports a compilation
error, that's logged in the test runner output.the test runner requires python3 and a salesforce developer edition org.
*Warning, it'll overwrite any class called JSON2ApexIntegration[_Test] you might have*
run the integration tests from the integration-test folder with
python3 tests.pyyou'll get output similar to
Logged in at https://na45.salesforce.com/services/Soap/u/42.0/00D300000000QSf
Compiling 2 scripts generated from basic_object.json explicitParse:False ✔ success
Compiling 2 scripts generated from basic_object.json explicitParse:True ✔ success
Compiling 2 scripts generated from dot_in_fieldname.json explicitParse:False ✔ success
Compiling 2 scripts generated from dot_in_fieldname.json explicitParse:True ✔ success
Compiling 2 scripts generated from dot_in_objectname.json explicitParse:False ✔ success
Compiling 2 scripts generated from dot_in_objectname.json explicitParse:True ✔ success
Compiling 2 scripts generated from field_array.json explicitParse:False ✔ success
Compiling 2 scripts generated from field_array.json explicitParse:True ✔ success
Compiling 2 scripts generated from underscore_in_fieldname.json explicitParse:False ✔ success
Compiling 2 scripts generated from underscore_in_fieldname.json explicitParse:True ✔ successNote that beatbox & xmltramp is GPL, not MIT like the rest of this project.