Add Go CSV parser implementation with jsonic plugin#1
Merged
Conversation
- Create go/ directory with CSV parser using github.com/jsonicjs/jsonic/go v0.1.4 - Implement standalone Parse() function with full CSV options parity: object, header, trim, comment, number, value, field separators, record separators, empty records, streaming, double-quote escaping - Provide MakeJsonic() for jsonic integration and Csv plugin via j.Use() - Create test/fixtures/ with manifest.json and 24 fixture test cases (CSV/JSON pairs) shared between TypeScript and Go implementations - All 24 fixture tests plus 14 unit tests pass https://claude.ai/code/session_01Ehie1ims4jJtda9A6MmD1x
Un-ignore test/fixtures/*.csv so the shared test fixture CSV files are tracked in git alongside their expected JSON outputs. https://claude.ai/code/session_01Ehie1ims4jJtda9A6MmD1x
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a complete CSV parser implementation for Go with support for the jsonic plugin system. The implementation provides RFC 4180-compliant CSV parsing with extensive configuration options and a comprehensive test suite.
Key Changes
Core Parser Implementation (
go/csv.go)Parse()function for parsing CSV text with configurable options#)orderedMaptype for consistent JSON comparisonPlugin Integration (
go/plugin.go)Csvplugin function for jsonic integration with high-priority matcherMakeJsonic()factory function for creating pre-configured jsonic instancesmapToOptions()helper to convert plugin configuration maps toCsvOptionsConfiguration Options
CsvOptions: Main configuration struct with boolean pointers for optional settingsFieldOptions: Field-level configuration (separator, naming, empty field handling)RecordOptions: Record-level configuration (custom separators, empty record preservation)Test Suite (
go/csv_test.go)test/fixtures/manifest.jsonTest Fixtures
Build Configuration
go/go.mod) with jsonic dependencyNotable Implementation Details
""→")https://claude.ai/code/session_01Ehie1ims4jJtda9A6MmD1x