E40C Feature request: deserialize to/from raw json · Issue #75 · fsprojects/FSharp.Json · GitHub
[go: up one dir, main page]

Skip to content

Feature request: deserialize to/from raw json #75

@reinux

Description

@reinux

In relation to #74 , there needs to be a way to deserialize json to raw json for further parsing later.

For example, Home Assistant returns json objects that look like this:

{
   "id": 18,
   "type":"event",
   "event":{
      "data":{
         "entity_id":"light.bed_light",
         "new_state":{ ... },
         "old_state":{ ... }
      },
      "event_type":"state_changed",
      "time_fired":"2016-11-26T01:37:24.265429+00:00",
      "origin":"LOCAL",
      "context": {
         "id": "326ef27d19415c60c492fe330945f954",
         "parent_id": null,
         "user_id": "31ddb597e03147118cf8d2f8fbea5553"
      }
   }
}

The sub-type of the event can't be parsed using JsonUnion unless I can deserialize it separately of the message type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0