Why does Twitter JSON archive have a different format than the REST API 1.1?


#1

Hello !

I recently asked to receive my Twitter Archive. Once received, I wanted to parse JSON files in it with Twitter4j which use the last REST API 1.1 format.

My problem is that there are two differents formats with media “sizes” and “created_at” date and I don’t understand why.

Exemple :

REST API v1.1 :

"created_at":"Wed Aug 27 13:08:45 +0000 2008" 

Twitter Archive:

"created_at":"2008-08-27 13:08:45 +0000"

And media “sizes” array :

REST API v1.1 :

 "sizes":{  
  "thumb":{  
     "h":150,
     "resize":"crop",
     "w":150
  },
  "large":{  
     "h":238,
     "resize":"fit",
     "w":226
  },
  "medium":{  
     "h":238,
     "resize":"fit",
     "w":226
  },
  "small":{  
     "h":238,
     "resize":"fit",
     "w":226
  }

}

Twitter Archive :

"sizes" : [ {
    "h" : 300,
    "resize" : "fit",
    "w" : 300
  }, {
    "h" : 300,
    "resize" : "fit",
    "w" : 300
  }, {
    "h" : 150,
    "resize" : "crop",
    "w" : 150
  }, {
    "h" : 300,
    "resize" : "fit",
    "w" : 300
  }, {
    "h" : 300,
    "resize" : "fit",
    "w" : 300
  } ]

This difference causes an error when parsing JSON and I don’t understand why these two formats are differents.
Yet it is said in the README that Twitter Archive contains the same representation as Tweets that are returned by version 1.1 of the Twitter API.

Thanks for your help.