[jira] Created: (LUCY-74) JSON parser internal API

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (LUCY-74) JSON parser internal API

Sebastian Nagel (Jira)
JSON parser internal API
------------------------

                 Key: LUCY-74
                 URL: https://issues.apache.org/jira/browse/LUCY-74
             Project: Lucy
          Issue Type: Improvement
          Components: Core, Perl bindings
            Reporter: Marvin Humphrey
            Assignee: Marvin Humphrey
            Priority: Blocker


Lucy will store most index metadata as JSON, so we need a JSON
encoder/decoder.  Eventually, we should write our own, but for now, this patch
supplies an API and leaves it up to the binding to fill in an implementation.

The supplied Perl binding implementation uses the CPAN module JSON::XS and
translates back and forth between Perl scalar-hash-array data structures and
Lucy CharBuf-Hash-VArray data structures.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCY-74) JSON parser internal API

Sebastian Nagel (Jira)

     [ https://issues.apache.org/jira/browse/LUCY-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marvin Humphrey updated LUCY-74:
--------------------------------

    Attachment: TestJson.c
                TestJson.bp
                035-json.t

> JSON parser internal API
> ------------------------
>
>                 Key: LUCY-74
>                 URL: https://issues.apache.org/jira/browse/LUCY-74
>             Project: Lucy
>          Issue Type: Improvement
>          Components: Core, Perl bindings
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>            Priority: Blocker
>         Attachments: 035-json.t, Json.bp, Json.c, json_support.diff, TestJson.bp, TestJson.c
>
>
> Lucy will store most index metadata as JSON, so we need a JSON
> encoder/decoder.  Eventually, we should write our own, but for now, this patch
> supplies an API and leaves it up to the binding to fill in an implementation.
> The supplied Perl binding implementation uses the CPAN module JSON::XS and
> translates back and forth between Perl scalar-hash-array data structures and
> Lucy CharBuf-Hash-VArray data structures.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (LUCY-74) JSON parser internal API

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

     [ https://issues.apache.org/jira/browse/LUCY-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marvin Humphrey updated LUCY-74:
--------------------------------

    Attachment: json_support.diff
                Json.c
                Json.bp

Lucy::Util::Json supplies four functions:

  * to_json
  * from_json
  * spew_json
  * slurp_json

The to_json() and from_json() functions operate on strings, and throw
exceptions if anything goes wrong.  The spew_json() and slurp_json() fuctions
operate on a Folder and a filepath; they set Err_error and return false/NULL
when something is awry, allowing internal C calling code to handle error
conditions.

> JSON parser internal API
> ------------------------
>
>                 Key: LUCY-74
>                 URL: https://issues.apache.org/jira/browse/LUCY-74
>             Project: Lucy
>          Issue Type: Improvement
>          Components: Core, Perl bindings
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>            Priority: Blocker
>         Attachments: 035-json.t, Json.bp, Json.c, json_support.diff, TestJson.bp, TestJson.c
>
>
> Lucy will store most index metadata as JSON, so we need a JSON
> encoder/decoder.  Eventually, we should write our own, but for now, this patch
> supplies an API and leaves it up to the binding to fill in an implementation.
> The supplied Perl binding implementation uses the CPAN module JSON::XS and
> translates back and forth between Perl scalar-hash-array data structures and
> Lucy CharBuf-Hash-VArray data structures.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (LUCY-74) JSON parser internal API

Sebastian Nagel (Jira)
In reply to this post by Sebastian Nagel (Jira)

     [ https://issues.apache.org/jira/browse/LUCY-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marvin Humphrey resolved LUCY-74.
---------------------------------

    Resolution: Fixed

Committed as r883945.

> JSON parser internal API
> ------------------------
>
>                 Key: LUCY-74
>                 URL: https://issues.apache.org/jira/browse/LUCY-74
>             Project: Lucy
>          Issue Type: Improvement
>          Components: Core, Perl bindings
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>            Priority: Blocker
>         Attachments: 035-json.t, Json.bp, Json.c, json_support.diff, TestJson.bp, TestJson.c
>
>
> Lucy will store most index metadata as JSON, so we need a JSON
> encoder/decoder.  Eventually, we should write our own, but for now, this patch
> supplies an API and leaves it up to the binding to fill in an implementation.
> The supplied Perl binding implementation uses the CPAN module JSON::XS and
> translates back and forth between Perl scalar-hash-array data structures and
> Lucy CharBuf-Hash-VArray data structures.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.