Provides a method for hashing structural data. According to this method, structural data that includes a plurality of keys and a plurality of values corresponding to respective keys is received. A plurality of key-value pairs can be parsed from the structural data, with each of the plurality of key-value pairs including a key and a value respectively corresponding to the key. A hash value of the plurality of key-value pairs is computed according to a predefined policy as a hash value of the structural data, wherein the predefined policy includes sorting the plurality of key-value pairs or processed key-value pairs.