poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] New JSON representation for Poke values in MI


From: Kostas Chasialis
Subject: Re: [RFC] New JSON representation for Poke values in MI
Date: Tue, 24 Aug 2021 11:57:34 +0200

Sorry I made a mistake, what you proposed can be and is done.

Thanks.

On 24 Aug 2021, at 12:08 AM, Kostas Chasialis <koschasialis@gmail.com> wrote:

Hi Mohammad,



A few minor comments:

1. What about removing the "value" field from "PokeValue"?


```
##
3500 as uint<32>
##
{
  "PokeType": {
      "code": "Integral",
      "info": {
          "size": 32,
          "signed_p": false
      }
  },
  "PokeValue": {
      "value": 3500
  }
}
```

to

```
  ...
  "PokeValue": 3500
}
```

And

```
##
"foo"
##
{
  "PokeType": {
      "code": "String",
  },
  "PokeValue": {
      "value": "foo"
  }
}
```

to

```
  "PokeType": { "code": "String" },
  "PokeValue": "foo"
```

And in structs, instead of

```
  ...
  "PokeValue": {
      "fields": [
          {
              "value": 1
          },
          {
              "value": 2
          }
      ],
  ...
```

```
  ...
  "PokeValue": {
      "fields": [1, 2],
  ...
```

Ditto for arrays.


We can’t do that because “PokeValue” is of “type”: “object” so all “$refs” have to be of type “object”
If we remove value from Values we will have something like

“StringValue”: {
“type”: “string"
}

or

“IntegralValue: {
“type”: “integer"
}

which are not of type “object”. I think the minimum we need is one property, “value”.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]